Skip to content

Commit

Permalink
Updating the release process (#534)
Browse files Browse the repository at this point in the history
This will allow for completely automated CI releases
  • Loading branch information
MovieStoreGuy authored Oct 22, 2024
1 parent 3f29f03 commit c830427
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# 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:
terraform-provider-release:
permissions: write-all
name: 'Terraform Provider Release'
uses: hashicorp/ghaction-terraform-provider-release/.github/workflows/community.yml@v4
secrets:
gpg-private-key: '${{ secrets.GPG_PRIVATE_KEY }}'
gpg-private-key-passphrase: ${{ secrets.PASSPHRASE }}
with:
setup-go-version-file: 'go.mod'
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,16 @@ See [Connect to AWS using the guided setup in Splunk Observability Cloud](https:
## Release the provider

To release the provider, install https://goreleaser.com/install/ (update to v2+ in you have an outdated version), then follow these steps:
The releases are done via Github actions following these steps:

1. Update the changelog and create a [release](https://github.com/splunk-terraform/terraform-provider-signalfx/releases) in GH (vx.y.z format) in **pre-release** state
1. Create an pull request with the updated changelog.

1. `git pull` (Locally)
1. Merge updated changelog once approved.

1. `export GPG_TTY=$(tty)` (avoid gpg terminal issues if using iTerm2)
1. Pull the last changes on main with merged changelog update.

1. `GITHUB_TOKEN=xxx GPG_FINGERPRINT=xxx goreleaser --clean` (github token must have `repo` scope)
1. Tag the current commit with the next version.

1. Wait for the CI automation to publish draft release to Github.

1. Go back to the release in github and set "Set as the latest release"

0 comments on commit c830427

Please sign in to comment.