File tree 4 files changed +105
-18
lines changed
4 files changed +105
-18
lines changed Original file line number Diff line number Diff line change
1
+ name : goreleaser
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ pull_request :
8
+ branches :
9
+ - master
10
+
11
+ jobs :
12
+ goreleaser :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Checkout
16
+ uses : actions/checkout@v2
17
+ - name : Unshallow
18
+ run : git fetch --prune --unshallow
19
+ - name : Set up Go
20
+ uses : actions/setup-go@v2
21
+ with :
22
+ go-version : 1.14
23
+ - name : Test
24
+ run : go test ./...
25
+ - name : Run GoReleaser
26
+ uses : goreleaser/goreleaser-action@v2
27
+ with :
28
+ version : latest
29
+ args : release --rm-dist --skip-publish --snapshot
30
+ env :
31
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : goreleaser
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - " v*"
7
+
8
+ jobs :
9
+ goreleaser :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout
13
+ uses : actions/checkout@v2
14
+ - name : Unshallow
15
+ run : git fetch --prune --unshallow
16
+ - name : Set up Go
17
+ uses : actions/setup-go@v2
18
+ with :
19
+ go-version : 1.14
20
+ - name : Test
21
+ run : go test ./...
22
+ - name : Run GoReleaser
23
+ uses : goreleaser/goreleaser-action@v2
24
+ with :
25
+ version : latest
26
+ args : release --rm-dist
27
+ env :
28
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 12
12
* .out
13
13
14
14
/dist
15
+ vendor /*
16
+
17
+ terraform-provider-rdsdataservice
Original file line number Diff line number Diff line change 1
- # This is an example goreleaser.yaml file with some sane defaults.
2
- # Make sure to check the documentation at http://goreleaser.com
1
+ # Visit https:// goreleaser.com for documentation on how to customize this
2
+ # behavior.
3
3
before :
4
4
hooks :
5
- # you may remove this if you don't use vgo
6
- - go mod tidy
7
- # you may remove this if you don't need go generate
5
+ - go mod download
8
6
- go generate ./...
9
7
builds :
10
- - env :
11
- - CGO_ENABLED=0
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
+ - linux
20
+ - darwin
21
+ goarch :
22
+ - amd64
23
+ ignore :
24
+ - goos : darwin
25
+ goarch : " 386"
26
+ binary : " {{ .ProjectName }}_v{{ .Version }}"
12
27
archives :
13
- - replacements :
14
- darwin : Darwin
15
- linux : Linux
16
- windows : Windows
17
- 386 : i386
18
- amd64 : x86_64
28
+ - format : zip
29
+ name_template : " {{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
19
30
checksum :
20
- name_template : ' checksums.txt'
21
- snapshot :
22
- name_template : " {{ .Tag }}-next"
31
+ name_template : " {{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
32
+ algorithm : sha256
33
+ signs :
34
+ - artifacts : checksum
35
+ args :
36
+ # if you are using this is a GitHub action or some other automated pipeline, you
37
+ # need to pass the batch flag to indicate its not interactive.
38
+ - " --batch"
39
+ - " --local-user"
40
+ - " --output"
41
+ - " ${signature}"
42
+ - " --detach-sign"
43
+ - " ${artifact}"
44
+ release :
45
+ prerelease : auto
46
+ # If you want to manually examine the release before its live, uncomment this line:
47
+ # draft: true
23
48
changelog :
24
49
sort : asc
25
50
filters :
26
51
exclude :
27
- - ' ^docs:'
28
- - ' ^test:'
52
+ - " ^docs:"
53
+ - " ^test:"
You can’t perform that action at this time.
0 commit comments