-
Notifications
You must be signed in to change notification settings - Fork 35
52 lines (42 loc) · 1.13 KB
/
release.yaml
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
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
name: Release
runs-on: ubuntu-20.04
needs: []
steps:
- name: Checkout code
id: checkout-code
uses: actions/checkout@v2
- name: Setup Go environment
uses: actions/setup-go@v2
with:
go-version: ^1.20
- name: Test
run: make test
- name: Build all artifacts
run: make build-all
- name: Create changelog
id: changelog
uses: innobead/github-release-notes-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release and upload artifacts
id: upload-release-asset
run: |
set -x
assets=()
while IFS= read -r -d '' f; do
if [[ -f "$f" ]]; then
assets+=("-a" "./$f")
fi
done < <(find ./target -print0)
tag_name="${GITHUB_REF##*/}"
hub release edit -d "${assets[@]}" -m "" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHANGELOG: ${{ steps.changelog.outputs.changelog }}