-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.26 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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