File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will build a golang project
2+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3+
4+ name : Go
5+
6+ on :
7+ push :
8+ branches : [ "main" ]
9+ tags : [ "v*" ]
10+ pull_request :
11+ branches : [ "main" ]
12+
13+ jobs :
14+
15+ build :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Set up Go
21+ uses : actions/setup-go@v4
22+ with :
23+ go-version : ' 1.25'
24+
25+ - name : Vet
26+ run : go vet ./...
27+
28+ - name : Build
29+ env :
30+ GOOS : linux
31+ CGO_ENABLED : 0
32+ run : go build -v -ldflags "-s -w" ./...
33+
34+ - name : Test
35+ run : go test -v ./...
36+
37+ - name : Upload Binary
38+ uses : actions/upload-artifact@v4
39+ with :
40+ name : gcp-sa-credential-provider
41+ path : gcp-sa-credential-provider
42+
43+ release :
44+ needs : build
45+ runs-on : ubuntu-latest
46+ if : github.ref_type == 'tag'
47+ steps :
48+ - name : Download Binary
49+ uses : actions/download-artifact@v5
50+ with :
51+ name : gcp-sa-credential-provider
52+
53+ - name : Release
54+ uses : softprops/action-gh-release@v2
55+ with :
56+ files : gcp-sa-credential-provider
You can’t perform that action at this time.
0 commit comments