fix build/release process #3
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: | |
- '*' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
name: Build binaries | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Setup Mage | |
uses: magefile/mage-action@v3 | |
with: | |
install-only: true | |
- name: Extract version | |
run: | | |
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
- name: Build binaries with Mage | |
run: | | |
mage v-all ${VERSION} | |
mage v-win ${VERSION} | |
mage v-mac ${VERSION} | |
- name: Release Notes | |
run: | | |
git log $(git describe HEAD~ --tags --abbrev=0)..HEAD --pretty='format:* %h %s%n * %an <%ae>' --no-merges >> ".github/RELEASE-TEMPLATE.md" | |
- name: Release with Notes | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
bin/* | |
bin/win64/* | |
bin/darwin/* | |
body_path: ".github/RELEASE-TEMPLATE.md" | |
tag_name: ${{ env.VERSION }} | |
draft: false | |
prerelease: false |