-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.45 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
50
51
52
53
54
name: Tag-release
on:
push:
tags:
- v*
jobs:
release:
name: Release new version
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go Faster
uses: WillAbides/[email protected]
timeout-minutes: 3
with:
go-version: "*"
- name: Setup ENV
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
run: |
echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
echo "RELEASE_NAME=$GITHUB_WORKFLOW" >> $GITHUB_ENV
- name: Build bin package
run: make build-all
- name: Generate changelog
run: |
go install ./cmd/chlog
chlog -c .github/changelog.yml -o changelog.md prev last
# https://github.com/softprops/action-gh-release
- name: Create release and upload assets
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ env.RELEASE_TAG }}
tag_name: ${{ env.RELEASE_TAG }}
body_path: changelog.md
token: ${{ secrets.GITHUB_TOKEN }}
files: |
build/chlog-darwin-amd64
build/chlog-linux-amd64
build/chlog-linux-arm
build/chlog-windows-amd64.exe