-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (47 loc) · 1.22 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
name: 发版
on:
push:
tags:
- 'v*'
# workflow_dispatch:
# inputs:
# build:
# description: '发版,请输入true'
# required: true
# default: 'true'
# version_description:
# description: '输入版本描述'
# required: true
# default: '升级内容:性能优化 | bug修复'
jobs:
build:
name: 编译并发布版本
runs-on: ubuntu-latest
steps:
- name: 准备代码
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 获取git标签
run: git fetch --force --tags
- name: 准备编译环境
uses: actions/setup-go@v3
with:
go-version: '1.17'
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: 运行GoReleaser发版
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
FURY_USER_NAME: at0m