Skip to content

Commit f00e41b

Browse files
authored
Sign releases and conform release artifacts naming to hashicorp tf provider requirements (#121)
* altered goreleaser and release workflow to do artifact signing * fixed indentation issue with yaml args for goreleaser * removed comma causing issue in the list * reduced the number of build target os * removed some ignore os that are not there in the build * updated the workflow to include GPG_FINGERPRINT env variable * remove release draft
1 parent bb63e4f commit f00e41b

File tree

2 files changed

+29
-14
lines changed

2 files changed

+29
-14
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,18 @@ jobs:
2525
# Install
2626
curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v0.4.2/gotestsum_0.4.2_linux_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin gotestsum
2727
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.25.0
28+
- name: Import GPG key
29+
id: import_gpg
30+
uses: crazy-max/ghaction-import-gpg@v2
31+
env:
32+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
33+
PASSPHRASE: ${{ secrets.PASSPHRASE }}
2834
-
2935
name: Run GoReleaser
3036
uses: goreleaser/goreleaser-action@v1
3137
with:
3238
version: latest
3339
args: release --rm-dist
3440
env:
35-
GITHUB_TOKEN: ${{ secrets.token }}
41+
GITHUB_TOKEN: ${{ secrets.token }}
42+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.goreleaser.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,38 @@ builds:
99
- CGO_ENABLED=0
1010
binary: terraform-provider-databricks_{{ .Tag }}
1111
goos:
12-
- darwin
13-
- linux
1412
- windows
13+
- linux
14+
- darwin
1515
goarch:
16-
- 386
1716
- amd64
17+
- '386'
18+
- arm
19+
- arm64
20+
ignore:
21+
- goos: darwin
22+
goarch: '386'
1823
archives:
19-
- replacements:
20-
darwin: macOS
21-
linux: Linux
22-
windows: Windows
23-
amd64: 64-bit
24-
386: 32-bit
25-
format_overrides:
26-
- goos: windows
27-
format: zip
24+
- format: zip
25+
name_template: '{{ .ProjectName }}_{{ replace .Version "v" "" }}_{{ .Os }}_{{ .Arch }}'
2826
files:
2927
- LICENSE*
3028
- CHANGELOG*
3129
- NOTICE*
3230
checksum:
33-
name_template: 'checksums.txt'
31+
name_template: '{{ .ProjectName }}_{{ replace .Version "v" "" }}_SHA256SUMS'
32+
algorithm: sha256
3433
snapshot:
3534
name_template: "{{ .Tag }}"
35+
signs:
36+
- artifacts: checksum
37+
args:
38+
- "--local-user"
39+
- "{{ .Env.GPG_FINGERPRINT }}"
40+
- "--output"
41+
- "${signature}"
42+
- "--detach-sign"
43+
- "${artifact}"
3644
changelog:
3745
sort: asc
3846
filters:

0 commit comments

Comments
 (0)