-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (84 loc) · 3.07 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
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
'on':
push:
branches:
- production
name: release
jobs:
release:
name: Create Release
container:
image: golang:latest
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Get Version
id: getver
run: |
output=`cat VERSION`
echo "::set-output name=VERSION::$output"
- name: Build project
run: |
git config --global --add safe.directory $PWD
make release
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.getver.outputs.VERSION }}
release_name: Release v${{ steps.getver.outputs.VERSION }}
body: TBA
draft: true
prerelease: false
- name: Upload Mac Executable
id: release_mac_exe
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out/${{ steps.getver.outputs.VERSION }}/bcn_darwin_amd64.zip
asset_name: bcn_darwin_amd64.zip
asset_content_type: application/zip
- name: Upload Mac M1 Executable
id: release_mac_arm_exe
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out/${{ steps.getver.outputs.VERSION }}/bcn_darwin_arm64.zip
asset_name: bcn_darwin_arm64.zip
asset_content_type: application/zip
- name: Upload Linux Executable
id: release_linux_exe
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out/${{ steps.getver.outputs.VERSION }}/bcn_linux_amd64.zip
asset_name: bcn_linux_amd64.zip
asset_content_type: application/zip
- name: Upload Linux ARM64 Executable
id: release_linux_arm_exe
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out/${{ steps.getver.outputs.VERSION }}/bcn_linux_arm64.zip
asset_name: bcn_linux_arm64.zip
asset_content_type: application/zip
- name: Upload Windows Executable
id: release_win_exe
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out/${{ steps.getver.outputs.VERSION }}/bcn_windows_amd64.zip
asset_name: bcn_windows_amd64.zip
asset_content_type: application/zip