File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ env :
10+ GONOSUMCHECK : github.com/GoCodeAlone/*
11+ GONOSUMDB : github.com/GoCodeAlone/*
12+ GOPRIVATE : github.com/GoCodeAlone/*
13+
14+ jobs :
15+ lint :
16+ name : Lint
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : actions/checkout@v4
20+
21+ - uses : actions/setup-go@v5
22+ with :
23+ go-version : ' 1.26'
24+ cache : true
25+
26+ - name : Resolve dependencies
27+ run : go mod tidy
28+
29+ - name : Run go vet
30+ run : go vet ./...
31+
32+ - name : Run go fmt check
33+ run : |
34+ if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then
35+ echo "The following files are not formatted:"
36+ gofmt -l .
37+ exit 1
38+ fi
39+
40+ build :
41+ name : Cross-platform Build
42+ runs-on : ubuntu-latest
43+ strategy :
44+ matrix :
45+ include :
46+ - goos : linux
47+ goarch : amd64
48+ - goos : linux
49+ goarch : arm64
50+ - goos : darwin
51+ goarch : amd64
52+ - goos : darwin
53+ goarch : arm64
54+ steps :
55+ - uses : actions/checkout@v4
56+
57+ - uses : actions/setup-go@v5
58+ with :
59+ go-version : ' 1.26'
60+ cache : true
61+
62+ - name : Resolve dependencies
63+ run : go mod tidy
64+
65+ - name : Build ${{ matrix.goos }}/${{ matrix.goarch }}
66+ env :
67+ GOOS : ${{ matrix.goos }}
68+ GOARCH : ${{ matrix.goarch }}
69+ run : |
70+ go build -o bin/workflow-plugin-admin-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/workflow-plugin-admin
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ permissions :
9+ contents : write
10+
11+ env :
12+ GONOSUMCHECK : github.com/GoCodeAlone/*
13+ GONOSUMDB : github.com/GoCodeAlone/*
14+ GOPRIVATE : github.com/GoCodeAlone/*
15+
16+ jobs :
17+ release :
18+ name : Build and Release
19+ runs-on : ubuntu-latest
20+ steps :
21+ - uses : actions/checkout@v4
22+ with :
23+ fetch-depth : 0
24+
25+ - uses : actions/setup-go@v5
26+ with :
27+ go-version : ' 1.26'
28+ cache : true
29+
30+ - name : Resolve dependencies
31+ run : go mod tidy
32+
33+ - name : Build binaries
34+ run : |
35+ VERSION=${GITHUB_REF#refs/tags/}
36+
37+ declare -a PLATFORMS=("linux/amd64" "linux/arm64" "darwin/amd64" "darwin/arm64")
38+ mkdir -p bin
39+
40+ for platform in "${PLATFORMS[@]}"; do
41+ os="${platform%%/*}"
42+ arch="${platform##*/}"
43+ output="bin/workflow-plugin-admin-${os}-${arch}"
44+ echo "Building ${output}..."
45+ GOOS=${os} GOARCH=${arch} go build -ldflags "-X main.version=${VERSION}" \
46+ -o "${output}" ./cmd/workflow-plugin-admin
47+ done
48+
49+ ls -la bin/
50+
51+ - name : Create release archives
52+ run : |
53+ mkdir -p dist
54+ for binary in bin/workflow-plugin-admin-*; do
55+ name=$(basename "${binary}")
56+ tar -czf "dist/${name}.tar.gz" -C bin "${name}"
57+ sha256sum "dist/${name}.tar.gz" >> dist/checksums.txt
58+ done
59+ cp plugin.json dist/
60+ ls -la dist/
61+
62+ - name : Create GitHub Release
63+ uses : softprops/action-gh-release@v2
64+ with :
65+ files : |
66+ dist/*.tar.gz
67+ dist/checksums.txt
68+ dist/plugin.json
69+ generate_release_notes : true
70+ draft : false
71+ prerelease : false
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/GoCodeAlone/workflow-plugin-admin
33go 1.26
44
55require (
6- github.com/GoCodeAlone/workflow v0.1.7
6+ github.com/GoCodeAlone/workflow v0.1.9
77 gopkg.in/yaml.v3 v3.0.1
88)
99
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ github.com/DataDog/datadog-go/v5 v5.4.0 h1:Ea3eXUVwrVV28F/fo3Dr3aa+TL/Z7Xi6SUPKW
3636github.com/DataDog/datadog-go/v5 v5.4.0 /go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw =
3737github.com/GoCodeAlone/go-plugin v0.0.0-20260220090904-b4c35f0e4271 h1:/oxxpYJ41BuK+/5Gp9c+0PHybyNFWeBHyCzkSVLCoMk =
3838github.com/GoCodeAlone/go-plugin v0.0.0-20260220090904-b4c35f0e4271 /go.mod h1:HbGQRZUIa+jbDfjsaZIMJYvrz+LnxL0mJpggfynSTMk =
39- github.com/GoCodeAlone/workflow v0.1.7 h1:M4srW5W6nN19hMG8suJPNAnOHTo+hfybyg96vthRQU8 =
40- github.com/GoCodeAlone/workflow v0.1.7 /go.mod h1:v0qTmIgwrBUhwOCN2x759c/hjVoKh9L1WalfJ1SW3iI =
39+ github.com/GoCodeAlone/workflow v0.1.9 h1:Wj3rLnP6TXhquzXN4X/YEIrhTO5vXisr8N9pJbcX2gw =
40+ github.com/GoCodeAlone/workflow v0.1.9 /go.mod h1:v0qTmIgwrBUhwOCN2x759c/hjVoKh9L1WalfJ1SW3iI =
4141github.com/GoCodeAlone/yaegi v0.17.1 h1:aPAwU29L9cGceRAff02c5pjQcT5KapDB4fWFZK9tElE =
4242github.com/GoCodeAlone/yaegi v0.17.1 /go.mod h1:z5Pr6Wse6QJcQvpgxTxzMAevFarH0N37TG88Y9dprx0 =
4343github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 h1:sBEjpZlNHzK1voKq9695PJSX2o5NEXl7/OL3coiIY0c =
You can’t perform that action at this time.
0 commit comments