Skip to content

Commit

Permalink
Modify release script to allow publishing to terraform registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Mongey committed Jun 19, 2020
1 parent 2b6f912 commit ebbd5ad
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
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 }}
12 changes: 11 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ builds:
goarm:
- 7
checksum:
name_template: 'checksums.txt'
name_template: '{{ .ProjectName }}_v{{ .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 ebbd5ad

Please sign in to comment.