File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Release
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*'
7
+
8
+ jobs :
9
+ build :
10
+ name : Build and release
11
+ runs-on : macos-latest
12
+ strategy :
13
+ matrix :
14
+ arch : [amd64, aarch64]
15
+
16
+ steps :
17
+ - name : Checkout code
18
+ uses : actions/checkout@v2
19
+
20
+ - name : Build (amd64)
21
+ if : matrix.arch == 'amd64'
22
+ run : make BUILD_ARCH=x86_64
23
+
24
+ - name : Build (aarch64)
25
+ if : matrix.arch == 'aarch64'
26
+ run : make BUILD_ARCH=arm64
27
+
28
+ - name : Create Release
29
+ if : matrix.arch == 'amd64'
30
+ id : create_release
31
+ uses : actions/create-release@v1
32
+ env :
33
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
+ with :
35
+ tag_name : ${{ github.ref }}
36
+ release_name : Release ${{ github.ref }}
37
+ draft : false
38
+ prerelease : false
39
+
40
+ - name : Upload Release Asset (amd64)
41
+ if : matrix.arch == 'amd64'
42
+ uses : actions/upload-release-asset@v1
43
+ env :
44
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45
+ with :
46
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
47
+ asset_path : ./trash
48
+ asset_name : trash-amd64
49
+ asset_content_type : application/octet-stream
50
+
51
+ - name : Upload Release Asset (aarch64)
52
+ if : matrix.arch == 'aarch64'
53
+ uses : actions/upload-release-asset@v1
54
+ env :
55
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
56
+ with :
57
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
58
+ asset_path : ./trash
59
+ asset_name : trash-aarch64
60
+ asset_content_type : application/octet-stream
You can’t perform that action at this time.
0 commit comments