Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Updating release process #534

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
atoulme marked this conversation as resolved.
Show resolved Hide resolved
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"
Loading