name: CI on: push: branches: - "**" pull_request: branches: - "**" jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: "1.24" - name: Install golangci-lint run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest - name: Run lint run: make lint test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: "1.24" - name: Install gotestfmt run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest - name: Run tests run: | set -euo pipefail go test -json -race -covermode=atomic -coverprofile=coverage.out ./pkg/... 2>&1 | tee /tmp/gotest.log | gotestfmt build: runs-on: ubuntu-latest needs: - lint - test steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: "1.24" - name: Build run: make build release: runs-on: ubuntu-latest needs: build if: github.event_name != 'pull_request' steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: actions/setup-go@v5 with: go-version: "1.24" - name: Build and install provider-zexlab plugin run: | go build -o provider-zexlab ./cmd/provider-zexlab/ PLUGIN_DIR=".semrel/$(go env GOOS)_$(go env GOARCH)/provider-zexlab/0.0.0-dev" mkdir -p "$PLUGIN_DIR" mv provider-zexlab "$PLUGIN_DIR/provider-zexlab" chmod +x "$PLUGIN_DIR/provider-zexlab" - uses: go-semantic-release/action@v1 with: github-token: ${{ secrets.ZX_TOKEN }} hooks: goreleaser custom-arguments: "--provider zexlab" env: GITEA_TOKEN: ${{ secrets.ZX_TOKEN }}