Improve CI #1
This file contains 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 | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Needed for git describe to work properly | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23' | |
cache: true | |
- name: Build | |
run: | | |
# Build for each supported platform | |
GOOS=linux GOARCH=amd64 make build | |
GOOS=linux GOARCH=arm64 make build | |
GOOS=darwin GOARCH=amd64 make build | |
- name: Create release | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
# Build for each supported platform | |
GOOS=linux GOARCH=amd64 make release | |
GOOS=linux GOARCH=arm64 make release | |
GOOS=darwin GOARCH=amd64 make release | |
- name: Push Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
build/*.tar.gz | |
build/*.sha256 | |
generate_release_notes: true |