ci: add release workflow and fix Go version #1
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| permissions: | |
| contents: write # needed to create the GitHub Release and upload assets | |
| jobs: | |
| release: | |
| name: Build & Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # full history so `git describe` resolves the tag | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.22" | |
| cache: true | |
| - name: Vet & Test | |
| run: | | |
| go vet ./... | |
| go test -race ./... | |
| - name: Build release binaries | |
| run: make dist | |
| - name: Generate checksums | |
| working-directory: dist | |
| run: sha256sum * > sha256sums.txt | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| dist/* |