diff --git a/README.md b/README.md index 6c65dbb..c7fef3f 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ go test -v ./... ## Documenting -This uses `./tools/tools.go` to in stall [`tfplugindocs`](github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs) +This project relies on `./tools/tools.go` to install [`tfplugindocs`](github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs). ```console export GOBIN=$PWD/bin @@ -32,22 +32,27 @@ go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs which tfplugindocs ``` -Generate docs, and preview them at https://registry.terraform.io/tools/doc-preview +Run `tfplugindocs` to generate docs, and preview individual files at https://registry.terraform.io/tools/doc-preview -## Release +## Releasing -https://developer.hashicorp.com/terraform/registry/providers/publishing#publishing-to-the-registry +There are a few one time steps that have been done already and will not be covered in this README. See the following footnote for more information. [^release] -- Sign in to https://registry.terraform.io/publish/provider/github/thiskevinwang/terraform-provider-pinecone -- Ensure repo has `.goreleaser.yml` -- gpg --armor --export "[EMAIL]" - - add this to registry signing keys -- gpg --armor --detach-sign -- git tag v0.1.1 -- GITHUB_TOKEN=$(gh auth token) goreleaser release --clean +[^release]: Docs on publishing: https://developer.hashicorp.com/terraform/registry/providers/publishing#publishing-to-the-registry + +To release a new version of the provider to the registry, a new GitHub release needs to be created. +Use the following steps to proceed. + +1. Ideally you’re on `main`, and have a clean working tree. +2. Ensure the commit (aka HEAD) you're about to release is tagged. + - `git tag v0.1.2` + - `git push origin v0.1.2` +3. Run `goreleaser`: `GITHUB_TOKEN=$(gh auth token) goreleaser release --clean` + - This will create a new GitHub release which should be detected by the Terraform registry shortly after. ## Appendix +- https://thekevinwang.com/2023/10/05/build-publish-terraform-provider - https://docs.pinecone.io/ - https://github.com/hashicorp/terraform-plugin-framework - https://developer.hashicorp.com/terraform/tutorials/providers-plugin-framework/providers-plugin-framework-provider