Skip to content

Commit

Permalink
Sign releases and conform release artifacts naming to hashicorp tf pr…
Browse files Browse the repository at this point in the history
…ovider 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
  • Loading branch information
stikkireddy committed Jun 18, 2020
1 parent bb63e4f commit f00e41b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 14 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Expand Up @@ -25,11 +25,18 @@ jobs:
# Install
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
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.25.0
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v2
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.token }}
GITHUB_TOKEN: ${{ secrets.token }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
34 changes: 21 additions & 13 deletions .goreleaser.yml
Expand Up @@ -9,30 +9,38 @@ builds:
- CGO_ENABLED=0
binary: terraform-provider-databricks_{{ .Tag }}
goos:
- darwin
- linux
- windows
- linux
- darwin
goarch:
- 386
- amd64
- '386'
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
archives:
- replacements:
darwin: macOS
linux: Linux
windows: Windows
amd64: 64-bit
386: 32-bit
format_overrides:
- goos: windows
format: zip
- format: zip
name_template: '{{ .ProjectName }}_{{ replace .Version "v" "" }}_{{ .Os }}_{{ .Arch }}'
files:
- LICENSE*
- CHANGELOG*
- NOTICE*
checksum:
name_template: 'checksums.txt'
name_template: '{{ .ProjectName }}_{{ replace .Version "v" "" }}_SHA256SUMS'
algorithm: sha256
snapshot:
name_template: "{{ .Tag }}"
signs:
- artifacts: checksum
args:
- "--local-user"
- "{{ .Env.GPG_FINGERPRINT }}"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
changelog:
sort: asc
filters:
Expand Down

0 comments on commit f00e41b

Please sign in to comment.