File tree Expand file tree Collapse file tree 1 file changed +25
-18
lines changed
Expand file tree Collapse file tree 1 file changed +25
-18
lines changed Original file line number Diff line number Diff line change 1- name : Publish Go Package
1+ name : Manual Publish Go Module
22
33on :
4- push :
5- tags :
6- - ' v*'
4+ workflow_dispatch : # <-- ini memungkinkan manual trigger dari GitHub UI
5+
6+ permissions :
7+ contents : read
8+ packages : write
79
810jobs :
9- build :
11+ build-and-publish :
1012 runs-on : ubuntu-latest
13+
1114 steps :
12- - uses : actions/checkout@v3
13- - name : Set up Go
14- uses : actions/setup-go@v4
15- with :
16- go-version : 1.21
17- - name : Publish to GitHub Packages
18- run : |
19- go mod tidy
20- GATEWAY_PKG=github.com/AutoFTbot/OrderKuota-go
21- GOOS=linux GOARCH=amd64 go build -o OrderKuota-go
22- # example: mengemas sebagai artifact atau mengarsipkan
23- env :
24- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+
18+ - name : Setup Go
19+ uses : actions/setup-go@v5
20+ with :
21+ go-version : ' 1.21.x'
22+
23+ - name : Build module (test)
24+ run : |
25+ go mod tidy
26+ go test ./...
27+ go build ./...
28+
29+ - name : Publish (optional)
30+ run : |
31+ echo "Build selesai. Siap publish jika perlu."
You can’t perform that action at this time.
0 commit comments