Skip to content

Commit

Permalink
Set up Terraform publication infra
Browse files Browse the repository at this point in the history
  • Loading branch information
ojacobson committed Jul 9, 2022
1 parent c2ec73e commit bd7b8dc
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This GitHub action can publish assets for release when a tag is created.
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
#
# This uses an action (hashicorp/ghaction-import-gpg) that assumes you set your
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
# secret. If you would rather own your own GPG handling, please fork this action
# or use an alternative one for key handling.
#
# You will need to pass the `--batch` flag to `gpg` in your signing step
# in `goreleaser` to indicate this is being used in a non-interactive mode.
#
name: release
on:
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
-
name: Import GPG key
id: import_gpg
uses: hashicorp/ghaction-import-gpg@v2.1.0
env:
# These secrets will need to be configured for the repository:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3.0.0
with:
version: latest
args: release --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
# GitHub sets this automatically
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ builds:
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64
binary: '{{ .ProjectName }}_v{{ .Version }}'
archives:
- format: zip
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/aequasi/discord-terraform

go 1.14
go 1.18

require (
github.com/andersfylling/disgord v0.18.1-0.20200822124930-07799219ff00
Expand Down
6 changes: 6 additions & 0 deletions terraform-registry-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"version": 1,
"metadata": {
"protocol_versions": ["5.0"]
}
}

0 comments on commit bd7b8dc

Please sign in to comment.