Skip to content

Commit

Permalink
Add signing of artifacts to the release (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ovaistariq authored Aug 30, 2024
1 parent c278c60 commit 301f08a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/go-releaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,22 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'
go-version: ">=1.22.4"
cache: true

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}

- name: Goreleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ checksum:
- glob: "terraform-registry-manifest.json"
name_template: "terraform-provider-tigris_{{ .Version }}_manifest.json"
algorithm: sha256

signs:
- artifacts: checksum
args:
- "--batch"
- "--local-user"
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"

release:
extra_files:
- glob: "terraform-registry-manifest.json"
Expand Down

0 comments on commit 301f08a

Please sign in to comment.