File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ name: launcher_go
22
33on :
44 push :
5+ tags :
6+ - " v*.*.*"
57 branches :
68 - main
79 paths :
4345 - name : Run tests
4446 working-directory : ./launcher_go/v2
4547 run : go test ./...
48+
49+ build_release :
50+ if : startsWith(github.ref, 'refs/tags/')
51+ permissions :
52+ contents : write
53+ runs-on : ubuntu-latest
54+ needs : [lint, test]
55+ strategy :
56+ matrix :
57+ goos : [linux, darwin]
58+ goarch : ["386", amd64, arm64]
59+ exclude :
60+ - goarch : " 386"
61+ goos : darwin
62+ steps :
63+ - uses : actions/checkout@v4
64+ - uses : actions/setup-go@v5
65+ with :
66+ go-version : " >=1.22.0"
67+ - name : build
68+ working-directory : ./launcher_go/v2
69+ env :
70+ GOOS : ${{ matrix.goos }}
71+ GOARCH : ${{ matrix.goarch }}
72+ BIN_FILE : launcher2
73+ ZIP_FILE : launcher2-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
74+ run : |
75+ go build -o bin/${BIN_FILE}
76+ cd bin
77+ tar cvfz ${ZIP_FILE} ${BIN_FILE}
78+ MD5_SUM=$(md5sum ${ZIP_FILE} | cut -d ' ' -f 1)
79+ echo ${MD5_SUM} > ${ZIP_FILE}.md5
80+ - name : Release
81+ uses : softprops/action-gh-release@v2
82+ with :
83+ files : |
84+ ./launcher_go/v2/bin/launcher2-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
85+ ./launcher_go/v2/bin/launcher2-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz.md5
You can’t perform that action at this time.
0 commit comments