Color-coded indicators: shape encodes action, color encodes freshness #13
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 | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| - name: Run tests | |
| run: go test ./... | |
| - name: Build binaries | |
| run: | | |
| VERSION=${GITHUB_REF_NAME} | |
| LDFLAGS="-s -w -X main.version=${VERSION}" | |
| mkdir -p dist | |
| GOOS=darwin GOARCH=arm64 go build -ldflags "${LDFLAGS}" -o dist/pr-patrol-darwin-arm64 . | |
| GOOS=darwin GOARCH=amd64 go build -ldflags "${LDFLAGS}" -o dist/pr-patrol-darwin-amd64 . | |
| GOOS=linux GOARCH=amd64 go build -ldflags "${LDFLAGS}" -o dist/pr-patrol-linux-amd64 . | |
| GOOS=linux GOARCH=arm64 go build -ldflags "${LDFLAGS}" -o dist/pr-patrol-linux-arm64 . | |
| GOOS=windows GOARCH=amd64 go build -ldflags "${LDFLAGS}" -o dist/pr-patrol-windows-amd64.exe . | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: dist/* |