Skip to content

Commit

Permalink
Prepare for publishing to Terraform Registry (#125)
Browse files Browse the repository at this point in the history
* Prepare for publishing to Terraform Registry
* remove double v from release binary
* Sign release
  • Loading branch information
Mongey authored Jun 9, 2020
1 parent 5d26e9a commit 0bd9699
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
uses: actions/setup-go@v1
with:
go-version: 1.13.x
- 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 }}
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
Expand All @@ -28,5 +34,6 @@ jobs:
args: release --rm-dist
key: ${{ secrets.YOUR_PRIVATE_KEY }}
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

7 changes: 7 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
uses: actions/setup-go@v1
with:
go-version: 1.13.x
- 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 }}
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
Expand All @@ -28,4 +34,5 @@ jobs:
args: release --snapshot --rm-dist
key: ${{ secrets.YOUR_PRIVATE_KEY }}
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 12 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
builds:
- binary: "{{ .ProjectName }}_v{{ .Version }}"
- binary: "{{ .ProjectName }}_{{ .Version }}"
env:
- CGO_ENABLED=0
goos:
Expand All @@ -14,6 +14,16 @@ builds:
goarm:
- 7
checksum:
name_template: 'checksums.txt'
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
algorithm: sha256
signs:
- artifacts: checksum
args:
- "--local-user"
- "A29F60D591A974E20B5E90695C886ACC44EB17C0"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
snapshot:
name_template: "{{ .Tag }}-next"

0 comments on commit 0bd9699

Please sign in to comment.