build: release v1.1.0 #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| # Full history and tags so the GoReleaser dry run can build the | |
| # changelog, matching the real release. | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Check formatting | |
| run: | | |
| unformatted="$(gofmt -l .)" | |
| if [ -n "$unformatted" ]; then | |
| echo "These files need gofmt:" >&2 | |
| echo "$unformatted" >&2 | |
| exit 1 | |
| fi | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Test | |
| run: go test ./... -race -cover | |
| # Exercise the full release pipeline without publishing: --snapshot | |
| # builds every target (and the Homebrew formula) but skips tagging and | |
| # upload, so the release config is validated on every push and PR. | |
| - name: GoReleaser (dry run) | |
| run: curl -sfL https://goreleaser.com/static/run | bash -s -- release --snapshot --clean |