リリース時のビルドを Makefile にまとめる #16
Workflow file for this run
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: | |
tags: | |
- "*" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: ./go.mod | |
- run: go install github.com/tcnksm/ghr@latest | |
- name: Patch | |
run: make patch | |
- name: Build | |
run: | | |
GOOS=linux GOARCH=amd64 make release | |
GOOS=darwin GOARCH=amd64 make release | |
GOOS=darwin GOARCH=arm64 make release | |
gzip dist/* | |
- name: Release | |
run: | | |
ghr -t "${{ secrets.GITHUB_TOKEN }}" -u "${{ github.repository_owner }}" -r "suzu" --replace -n "${GITHUB_REF##*/}" -draft "${GITHUB_REF##*/}" dist/ |