File tree Expand file tree Collapse file tree 2 files changed +105
-0
lines changed Expand file tree Collapse file tree 2 files changed +105
-0
lines changed Original file line number Diff line number Diff line change 1+ name : goreleaser
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ note :
7+ description : ' Note'
8+ required : false
9+ default : ' '
10+ pull_request :
11+ push :
12+ tags :
13+ - ' *'
14+
15+ permissions :
16+ contents : write
17+
18+ jobs :
19+ goreleaser :
20+ runs-on : ubuntu-latest
21+ steps :
22+ -
23+ name : Checkout
24+ uses : actions/checkout@v2
25+ with :
26+ fetch-depth : 0
27+ -
28+ name : Set up Go
29+ uses : actions/setup-go@v2
30+ with :
31+ go-version : 1.17.3
32+ -
33+ name : Run GoReleaser
34+ uses : goreleaser/goreleaser-action@v2
35+ with :
36+ distribution : goreleaser
37+ version : latest
38+ args : release --rm-dist
39+ env :
40+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41+ -
42+ name : Upload artifacts
43+ uses : actions/upload-artifact@v2
44+ with :
45+ name : lbcd-${{ github.sha }}
46+ path : |
47+ dist/checksums.txt
48+ dist/*.tar.gz
Original file line number Diff line number Diff line change 1+ # This is an example .goreleaser.yml file with some sensible defaults.
2+ # Make sure to check the documentation at https://goreleaser.com
3+ before :
4+ hooks :
5+ # You may remove this if you don't use go modules.
6+ - go mod tidy
7+ # you may remove this if you don't need go generate
8+ - go generate ./...
9+ builds :
10+ -
11+ main : .
12+ id : " lbcd"
13+ binary : " lbcd"
14+ env :
15+ - CGO_ENABLED=0
16+ flags :
17+ - -trimpath
18+ ldflags :
19+ - -s -w
20+ - -X main.appBuild={{.Commit}}
21+ targets :
22+ - linux_amd64
23+ - linux_arm64
24+ - darwin_amd64
25+ - darwin_arm64
26+ - windows_amd64
27+ -
28+ main : ./cmd/lbcctl
29+ id : " lbcctl"
30+ binary : " lbcctl"
31+ flags :
32+ - -trimpath
33+ ldflags :
34+ - -s -w
35+ - -X main.appBuild={{.Commit}}
36+ env :
37+ - CGO_ENABLED=0
38+ targets :
39+ - linux_amd64
40+ - linux_arm64
41+ - darwin_amd64
42+ - darwin_arm64
43+ - windows_amd64
44+ checksum :
45+ name_template : ' checksums.txt'
46+ snapshot :
47+ name_template : " {{ incpatch .Version }}-next"
48+ changelog :
49+ sort : asc
50+ filters :
51+ exclude :
52+ - ' ^docs:'
53+ - ' ^test:'
54+
55+ release :
56+ draft : true
57+ prerelease : auto
You can’t perform that action at this time.
0 commit comments