File tree Expand file tree Collapse file tree 1 file changed +61
-6
lines changed
Expand file tree Collapse file tree 1 file changed +61
-6
lines changed Original file line number Diff line number Diff line change 66name : Release
77
88jobs :
9- build :
10- name : Release
9+ ubuntu- build :
10+ name : Ubuntu build
1111 runs-on : ubuntu-latest
1212 steps :
1313
@@ -26,15 +26,70 @@ jobs:
2626 - name : Checkout code
2727 uses : actions/checkout@v2
2828
29- - name : Set output
30- id : vars
31- run : echo ::set-output name=tag::${GITHUB_REF#refs/*/}
32-
3329 - name : Build project
3430 run : |
3531 chmod +x build.sh
3632 ./build.sh
3733
34+ - name : Upload
35+ uses : actions/upload-artifact@v2
36+ with :
37+ name : my-artifact
38+ path : |
39+ ./build/*.zip
40+ !./build/*_windows_amd64.zip
41+
42+ windows-build :
43+ name : Windows build
44+ runs-on : windows-latest
45+ steps :
46+
47+ - name : Set up upx
48+ run : choco install upx
49+
50+ - name : Set up Go 1.x
51+ uses : actions/setup-go@v2
52+ with :
53+ go-version : ^1.16
54+ id : go
55+
56+ - name : Set up node 14.x
57+ uses : actions/setup-node@v2
58+ with :
59+ node-version : 14.x
60+ id : node
61+
62+ - name : Checkout code
63+ uses : actions/checkout@v2
64+
65+ - name : Build project
66+ run : .\build.ps1
67+
68+ - name : Upload
69+ uses : actions/upload-artifact@v2
70+ with :
71+ name : my-artifact
72+ path : .\build\*_windows_amd64.zip
73+
74+ release :
75+ name : Release
76+ needs : [ubuntu-build, windows-build]
77+ runs-on : ubuntu-latest
78+ steps :
79+
80+ - name : Checkout code
81+ uses : actions/checkout@v2
82+
83+ - name : Set output
84+ id : vars
85+ run : echo ::set-output name=tag::${GITHUB_REF#refs/*/}
86+
87+ - name : Download
88+ uses : actions/download-artifact@v2
89+ with :
90+ name : my-artifact
91+ path : ./build/
92+
3893 - name : Release
3994 uses : softprops/action-gh-release@v1
4095 if : startsWith(github.ref, 'refs/tags/')
You can’t perform that action at this time.
0 commit comments