File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build artifacts & Release
2+
3+ on :
4+ schedule :
5+ - cron : " 0 4 * * *"
6+ workflow_dispatch :
7+ inputs :
8+ tag_name :
9+ description : " Tag name for release"
10+ required : false
11+ default : nightly
12+ push :
13+ tags :
14+ - v[0-9]+.[0-9]+.[0-9]+*
15+
16+ jobs :
17+ release :
18+ permissions :
19+ contents : write
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout
23+ uses : actions/checkout@v3
24+ - name : Setup Go
25+ uses : actions/setup-go@v3
26+ with :
27+ go-version : " stable"
28+ - name : Build
29+ run : sh ./release.sh
30+ - if : github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
31+ name : Release Nightly
32+ uses : softprops/action-gh-release@v1
33+ with :
34+ files : release/ink*
35+ prerelease : true
36+ tag_name : nightly
37+ name : Nightly build
38+ generate_release_notes : true
39+ fail_on_unmatched_files : true
40+ - if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
41+ name : Release
42+ uses : softprops/action-gh-release@v1
43+ with :
44+ files : release/ink*
45+ prerelease : false
46+ name : Release ${{ github.ref }}
47+ generate_release_notes : true
48+ fail_on_unmatched_files : true
Original file line number Diff line number Diff line change 55build () {
66 echo " building for $1 $2 ..."
77 suffix=" "
8- if [ $1 == " windows" ]
8+ if [ $1 = " windows" ]
99 then
1010 suffix=" .exe"
1111 fi
1212 GOOS=$1 GOARCH=$2 go build -o release/ink$suffix
1313 cd release
14- if [ $1 == " linux" ]
14+ if [ $1 = " linux" ]
1515 then
1616 tar cvf - blog/* ink$suffix | gzip -9 - > ink_$1 _$2 .tar.gz
1717 else
@@ -28,8 +28,15 @@ rsync -av template/* release/blog --delete --exclude public --exclude theme/node
2828
2929build linux 386
3030build linux amd64
31+ build linux arm
32+ build linux arm64
33+
3134build darwin amd64
35+ build darwin arm64
36+
3237build windows 386
3338build windows amd64
39+ build windows arm
40+ build windows arm64
3441
3542rm -rf release/blog
You can’t perform that action at this time.
0 commit comments