Skip to content

chore(release): GoReleaser + release workflow + Terraform Registry publishing runbook - #22

Merged
PF9-pushkar merged 1 commit into
mainfrom
chore/registry-publishing
Jul 12, 2026
Merged

chore(release): GoReleaser + release workflow + Terraform Registry publishing runbook#22
PF9-pushkar merged 1 commit into
mainfrom
chore/registry-publishing

Conversation

@PF9-pushkar

Copy link
Copy Markdown
Collaborator

Summary

Wires up Terraform Registry publishing so a v* tag produces a signed, registry-ingestible release. This is the release-tooling portion of Phase 3 — no provider code changes.

  • .goreleaser.yml — cross-builds a binary for every registry-supported goos/goarch with the main.version ldflag, zips them, generates SHA256SUMS, GPG-signs the checksums, and bundles terraform-registry-manifest.json (protocol 6.0) into the release. Validated locally with goreleaser check and a single-target snapshot build.
  • .github/workflows/release.yml — on a v* tag: imports the org GPG key and runs GoReleaser (pinned to the ~> v2.5 line so the action's GoReleaser matches the config syntax).
  • test.yml — adds a goreleaser check job so release-config drift is caught in PRs, not at release time.
  • RELEASING.md — the runbook:
    • One-time setup (human, repo-admin): generate the signing GPG key, add GPG_PRIVATE_KEY / PASSPHRASE GitHub secrets, make the repo public, register the provider + upload the public key on registry.terraform.io.
    • Per-release: roll the changelog, git tag vX.Y.Z && git push, watch the workflow, verify on the registry with terraform init.
  • .gitignore — never commit exported key material (*.asc, *.gpg).

The terraform-registry-manifest.json and main.go's version wiring / registry address (registry.terraform.io/platform9/pcd) were already in place.

What this PR does NOT do

The actual publishing actions are intentionally left to a human and documented in RELEASING.md, because they're outward-facing and account-level: making the repo public, generating/holding the GPG private key, adding repo secrets, and registering on the Terraform Registry. Nothing here publishes anything on its own — only a pushed v* tag triggers a release.

Validation

  • goreleaser check passes against the pinned v2.5 line (caught and fixed a formats:format: schema mismatch during authoring).
  • goreleaser build --snapshot --single-target builds the provider with the version ldflag embedded; go.mod/go.sum untouched.
  • go build ./... clean.

…ng runbook

Wire up Terraform Registry publishing so a `v*` tag produces a signed release:

- .goreleaser.yml — cross-builds every platform binary with the version ldflag,
  zips them, checksums with SHA256, GPG-signs the checksums, and bundles
  terraform-registry-manifest.json into the release (validated with
  `goreleaser check` against the v2.5 line).
- .github/workflows/release.yml — on a `v*` tag, imports the org GPG key and
  runs GoReleaser (pinned to the ~> v2.5 line to match the config syntax).
- test.yml — add a `goreleaser check` job so release-config drift is caught in
  PRs, not at release time.
- RELEASING.md — runbook for the one-time setup (GPG key, GitHub secrets, make
  repo public, register on the Terraform Registry) and the per-release flow
  (changelog, tag, verify).
- .gitignore — never commit exported key material (*.asc, *.gpg).

No provider code changes; the registry manifest and main.go version wiring were
already in place.
@PF9-pushkar
PF9-pushkar merged commit d8a0019 into main Jul 12, 2026
5 checks passed
@PF9-pushkar
PF9-pushkar deleted the chore/registry-publishing branch July 12, 2026 20:01
PF9-pushkar added a commit that referenced this pull request Jul 14, 2026
chore(release): GoReleaser + release workflow + Terraform Registry publishing runbook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant