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 : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - " v[0-9]+.[0-9]+.[0-9]+"
7+ workflow_dispatch :
8+ inputs :
9+ tag :
10+ description : " Existing tag to release (e.g. v0.0.1)"
11+ required : true
12+
13+ permissions :
14+ contents : write
15+
16+ jobs :
17+ release :
18+ runs-on : ubuntu-latest
19+ steps :
20+ - name : Checkout
21+ uses : actions/checkout@v4
22+ with :
23+ fetch-depth : 0
24+ ref : ${{ inputs.tag || github.ref }}
25+
26+ - name : Set up Go
27+ uses : actions/setup-go@v5
28+ with :
29+ go-version-file : go.mod
30+
31+ - name : Run tests
32+ run : go test -v ./...
33+
34+ - name : Run GoReleaser
35+ uses : goreleaser/goreleaser-action@v6
36+ with :
37+ version : latest
38+ args : release --clean
39+ env :
40+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41+ GORELEASER_CURRENT_TAG : ${{ inputs.tag || '' }}
Original file line number Diff line number Diff line change 1+ version : 2
2+
3+ builds :
4+ - main : .
5+ binary : kubectl-metrics
6+ env :
7+ - CGO_ENABLED=0
8+ ldflags :
9+ - -s -w -X main.version={{.Version}}
10+ goos :
11+ - linux
12+ - darwin
13+ - windows
14+ goarch :
15+ - amd64
16+ - arm64
17+
18+ archives :
19+ - format : binary
20+ name_template : " {{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
21+
22+ checksum :
23+ name_template : checksums.txt
24+
25+ changelog :
26+ sort : asc
27+ filters :
28+ exclude :
29+ - " ^docs:"
30+ - " ^test:"
31+ - " ^ci:"
32+
33+ release :
34+ github :
35+ owner : Funcan
36+ name : kubectl-metrics
You can’t perform that action at this time.
0 commit comments