Skip to content

Commit 35fc021

Browse files
authored
Update publiah.yml
1 parent 7a908d2 commit 35fc021

File tree

1 file changed

+25
-18
lines changed

1 file changed

+25
-18
lines changed

.github/workflows/publiah.yml

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
1-
name: Publish Go Package
1+
name: Manual Publish Go Module
22

33
on:
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

810
jobs:
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."

0 commit comments

Comments
 (0)