-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (95 loc) · 2.82 KB
/
build.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Create release & Generate executables
on:
push:
tags:
- 'v*'
jobs:
create_release:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
Changes in this Release
${{ github.event.head_commit.message }}
draft: false
prerelease: false
- name: Gets latest created release info
id: latest_release_info
uses: jossef/[email protected]
- name: Add Swagger to release
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
asset_path: file-system-service.swagger.yml
create_dist:
name: Create dist directory
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create directory
run: mkdir ./dist
release-linux-gui-amd64:
name: release linux/amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.TOKEN }}
goos: linux
goarch: amd64
md5sum: false
binary_name: file-system-service-linux
retry: 3
release-windows-gui-amd64:
name: release windows/amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.TOKEN }}
goos: windows
goarch: amd64
md5sum: false
binary_name: file-system-service-windows
retry: 3
release-darwin-gui-amd64:
name: release darwin/amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.TOKEN }}
goos: darwin
goarch: amd64
md5sum: false
binary_name: file-system-service-darwin-amd64
retry: 3
release-darwin-gui-arm64:
name: release darwin/arm64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.TOKEN }}
goos: darwin
goarch: arm64
md5sum: false
binary_name: file-system-service-darwin-arm64
retry: 3