name: Go build on: push: branches: - main pull_request: branches: - main jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: '0' lfs: 'true' fetch-tags: 'true' - name: Setup Go 1.21.x uses: actions/setup-go@v4 with: # Semantic version range syntax or exact version of Go go-version: '1.21.x' - name: golangci-lint uses: golangci/golangci-lint-action@v3 - name: Install Task uses: arduino/setup-task@v1 - name: Run tests run: | go install gotest.tools/gotestsum@latest gotestsum --junitfile out/results.xml --format pkgname-and-test-fails -- -race -shuffle=on ./... - uses: goreleaser/goreleaser-action@v5 if: ${{ !startsWith(github.ref, 'refs/tags/v') }} with: distribution: goreleaser version: latest args: release --clean --snapshot