File tree 4 files changed +70
-26
lines changed
4 files changed +70
-26
lines changed Original file line number Diff line number Diff line change
1
+ # This GitHub action can publish assets for release when a tag is created.
2
+ # Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
3
+
4
+ name : release
5
+ on :
6
+ push :
7
+ tags :
8
+ - ' v*'
9
+ jobs :
10
+ goreleaser :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ -
14
+ name : Checkout
15
+ uses : actions/checkout@v2
16
+ -
17
+ name : Unshallow
18
+ run : git fetch --prune --unshallow
19
+ -
20
+ name : Set up Go
21
+ uses : actions/setup-go@v2
22
+ with :
23
+ go-version : 1.14
24
+ -
25
+ name : Run GoReleaser
26
+ uses : goreleaser/goreleaser-action@v2
27
+ with :
28
+ version : latest
29
+ args : release --rm-dist
30
+ env :
31
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32
+ GPG_FINGERPRINT : ${{ steps.import_gpg.outputs.fingerprint }}
Original file line number Diff line number Diff line change
1
+ # Visit https://goreleaser.com for documentation on how to customize this
2
+ # behavior.
3
+ before :
4
+ hooks :
5
+ # this is just an example and not a requirement for provider building/publishing
6
+ - go mod tidy
7
+ builds :
8
+ - env :
9
+ # goreleaser does not work with CGO, it could also complicate
10
+ # usage by users in CI/CD systems like Terraform Cloud where
11
+ # they are unable to install libraries.
12
+ - CGO_ENABLED=0
13
+ mod_timestamp : ' {{ .CommitTimestamp }}'
14
+ flags :
15
+ - -trimpath
16
+ ldflags :
17
+ - ' -s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
18
+ goos :
19
+ - darwin
20
+ - windows
21
+ - linux
22
+ goarch :
23
+ - amd64
24
+ - ' 386'
25
+ - arm
26
+ - arm64
27
+ binary : ' {{ .ProjectName }}_v{{ .Version }}'
28
+ archives :
29
+ - format : zip
30
+ name_template : ' {{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
31
+ checksum :
32
+ name_template : ' {{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
33
+ algorithm : sha256
34
+ release :
35
+ # Visit your project's GitHub Releases page to publish this release .
36
+ draft : true
37
+ changelog :
38
+ skip : true
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments