-
Notifications
You must be signed in to change notification settings - Fork 123
56 lines (49 loc) · 1.19 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
55
56
name: release
on:
push:
tags:
- 'v*'
jobs:
changelog:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: npx changelogithub # or [email protected] if ensure the stable result
env:
GITHUB_TOKEN: ${{secrets.WXBOT_TOKEN}}
release:
needs: changelog
strategy:
matrix:
platform: [ ubuntu-latest ]
go-version: [ '1.20' ]
name: Release
runs-on: ${{ matrix.platform }}
permissions:
contents: write
steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Install dependencies
run: |
sudo apt install upx
- name: Build
run: |
export GOPROXY=https://goproxy.cn,direct
go mod tidy
make release version=${{ github.ref_name }}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: build/*.tar.gz