-
Notifications
You must be signed in to change notification settings - Fork 37
Releasing
Fix the code and docs/version and run this the performrelease.sh
script. Usage for the script is:
$ ./performrelease.sh -h
usage: ./performrelease.sh -v version [-b branch] [-s source dir] [-o output dir] [-t] [-u] [-c] [-h]
-v sets the version
-b sets the branch (defaults to 'master')
-s sets the source directory (defaults to /Users/rohit/cloudstack-terraform-provider)
-o sets the output directory (defaults to /tmp/cloudstack-terraform-provider-build/)
-t tags the git repo with the version
-u sets the certificate ID to sign with (if not provided, the default key is attempted)
-c commits build artifacts to cloudstack dev dist dir in svn
-h
Install goreleaser:
https://goreleaser.com/install/
Check and ensure TF provider passes builds, GA and run this for local checks:
goreleaser release --snapshot --clean
Create a personalised Github token: https://github.com/settings/tokens/new?scopes=repo,write:packages
export GITHUB_TOKEN="YOUR_GH_TOKEN"
Setup your GPG keys (without passphrase) and add to the provider for the 'cloudstack' namespace: https://registry.terraform.io/settings/gpg-keys and export your GPG key in shell as:
export GPG_FINGERPRINT="<GPG KEY/Fingerprint here>"
Add the workaround remote, this is because Terraform registry expects repos to be named in a certain way:
git remote add cloudstack git@github.com:cloudstack/terraform-provider-cloudstack.git
Finally tag the release, for example and push to Github:
git tag -a v0.5.0-pre -m "v0.5.0-pre Alpha Release for testing purposes"
git push cloudstack v0.5.0-pre
Finally release, during which it will
goreleaser release --clean
For publishing to other repo such as to https://github.com/apache/cloudstack-terraform-provider, fix the repo owner/org and name in .goreleaser.yml and run:
goreleaser release --clean --skip-validate