1- name : goreleaser
2-
3- on :
4- push :
5- tags :
6- - ' v*.*.*'
7- workflow_dispatch :
8-
9- jobs :
10- goreleaser :
11- runs-on : ubuntu-20.04
12- steps :
13- -
14- name : Checkout
15- uses : actions/checkout@v3
16- with :
17- fetch-depth : 0
18- token : ${{ secrets.GITHUB_TOKEN }}
19- submodules : recursive
20-
21- - name : Install upx
22- run : sudo apt install upx zip -y
23- continue-on-error : true
24-
25- - name : Set up GCC
26- uses : egor-tensin/setup-gcc@v1
27- with :
28- version : latest
29- platform : x64
30- -
31- name : Set up Go
32- uses : actions/setup-go@v3
33- with :
34- go-version : ' 1.20 '
35- -
36- name : Run GoReleaser
37- uses : goreleaser/goreleaser-action@v4
38- with :
39- distribution : goreleaser
40- version : latest
41- args : release
42- env :
43- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44- GOPATH : " /home/runner/go"
45-
46- - name : Set up Go 1.17
47- uses : actions/setup-go@v3
48- with :
49- go-version : ' 1.17'
50-
51- - name : Compile for Windows x64
52- run : go build -o dist/zombie_windows7_amd64.exe -ldflags "-s -w" -tags="forceposix nobar noembed" -asmflags "all=-trimpath=${{ env.GOPATH }}" -gcflags "all=-trimpath=${{ env.GOPATH }}" .
53- env :
54- GOOS : windows
55- GOARCH : amd64
56-
57- - name : Compile for Windows x86
58- run : go build -o dist/zombie_windows7_386.exe -ldflags "-s -w" -tags="forceposix nobar noembed" -asmflags "all=-trimpath=${{ env.GOPATH }}" -gcflags "all=-trimpath=${{ env.GOPATH }}" .
59- env :
60- GOOS : windows
61- GOARCH : ' 386'
62-
63- - name : Zip files
64- run : zip -r -j dist/zombie_archive.zip dist/zombie* README.md
65-
66- - name : Upload binaries to release
67- uses : svenstaro/upload-release-action@v2
68- with :
69- repo_token : ${{ secrets.GITHUB_TOKEN }}
70- file : dist/zombie*
71- tag : ${{ github.ref }}
72- overwrite : true
73- file_glob : true
74- draft : true
1+ name : goreleaser
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*.*.*'
7+ workflow_dispatch :
8+
9+ jobs :
10+ goreleaser :
11+ runs-on : ubuntu-latest
12+ steps :
13+ -
14+ name : Checkout
15+ uses : actions/checkout@v4
16+ with :
17+ fetch-depth : 0
18+ token : ${{ secrets.GITHUB_TOKEN }}
19+ submodules : recursive
20+
21+ - name : Install upx
22+ run : sudo apt install upx zip -y
23+ continue-on-error : true
24+
25+ - name : Set up GCC
26+ uses : egor-tensin/setup-gcc@v1
27+ with :
28+ version : latest
29+ platform : x64
30+ -
31+ name : Set up Go
32+ uses : actions/setup-go@v5
33+ with :
34+ go-version-file : go.mod
35+ -
36+ name : Run GoReleaser
37+ uses : goreleaser/goreleaser-action@v6
38+ with :
39+ distribution : goreleaser
40+ version : latest
41+ args : release
42+ env :
43+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44+ GOPATH : " /home/runner/go"
45+
46+ - name : Set up Go 1.17
47+ uses : actions/setup-go@v5
48+ with :
49+ go-version : ' 1.17'
50+
51+ - name : Compile for Windows x64
52+ run : go build -o dist/zombie_windows7_amd64.exe -ldflags "-s -w" -tags="forceposix nobar noembed" -asmflags "all=-trimpath=${{ env.GOPATH }}" -gcflags "all=-trimpath=${{ env.GOPATH }}" .
53+ env :
54+ GOOS : windows
55+ GOARCH : amd64
56+
57+ - name : Compile for Windows x86
58+ run : go build -o dist/zombie_windows7_386.exe -ldflags "-s -w" -tags="forceposix nobar noembed" -asmflags "all=-trimpath=${{ env.GOPATH }}" -gcflags "all=-trimpath=${{ env.GOPATH }}" .
59+ env :
60+ GOOS : windows
61+ GOARCH : ' 386'
62+
63+ - name : Zip files
64+ run : zip -r -j dist/zombie_archive.zip dist/zombie* README.md
65+
66+ - name : Upload binaries to release
67+ uses : svenstaro/upload-release-action@v2
68+ with :
69+ repo_token : ${{ secrets.GITHUB_TOKEN }}
70+ file : dist/zombie*
71+ tag : ${{ github.ref }}
72+ overwrite : true
73+ file_glob : true
74+ draft : true
0 commit comments