File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build the binary and create release
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ tags :
7+ - ' **'
8+
9+ jobs :
10+ build-and-release :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : write
14+
15+ steps :
16+ - name : Checkout the repository
17+ uses : actions/checkout@v4
18+
19+ - name : Setup Go
20+ uses : actions/setup-go@v5
21+ with :
22+ go-version : ' 1.21'
23+ cache-dependency-path : teamup-rocketchat-bot/go.sum
24+
25+ - name : Build the binary for linux/amd64
26+ working-directory : teamup-rocketchat-bot
27+ run : |
28+ GOARCH=amd64 GOOS=linux go build -o build/linux-amd64-${{ github.ref_name }} .
29+ echo "binary created with filename $(ls build/)"
30+
31+ - name : Create GitHub release and upload binary
32+ uses : softprops/action-gh-release@v2
33+ with :
34+ files : teamup-rocketchat-bot/build/linux-amd64-${{ github.ref_name }}
35+ env :
36+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments