Adopt changesets for versioning and a consolidated release workflow#650
Open
drewda wants to merge 5 commits into
Open
Adopt changesets for versioning and a consolidated release workflow#650drewda wants to merge 5 commits into
drewda wants to merge 5 commits into
Conversation
Adopt changesets to track per-PR changes and drive releases, keeping continuity with the existing vX.Y.Z git tags (changesets uses the v-prefixed format for single-package repos; package.json is seeded at the current 1.3.3). Consolidate the release pipeline into a single workflow triggered after a green Test Suite on main: a changesets step opens/updates the "Version Packages" PR, and once merged the same workflow builds, signs, tags, creates the GitHub Release (notes from CHANGELOG.md), and dispatches the Homebrew update. Because there is no cross-workflow trigger, the built-in GITHUB_TOKEN covers all in-repo steps; the GitHub App token is used only for the cross-repo Homebrew dispatch (unchanged scope). Supply-chain hardening: SHA-pin all GitHub Actions, exact dependency versions with a committed pnpm-lock.yaml, a pnpm install cooldown (minimumReleaseAge), and no dependency lifecycle scripts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces Changesets + pnpm-based release tooling to manage version bumps and changelog generation for this Go project, and rewires the GitHub Actions release pipeline to run only after the “Test Suite” workflow succeeds on main, preserving the existing vX.Y.Z tag series.
Changes:
- Adds Changesets configuration and documentation, plus an initial changeset entry to seed the new process.
- Introduces a pinned pnpm toolchain (
package.json,pnpm-lock.yaml, workspace +.npmrc) to harden dependency installation for the release tooling. - Replaces the prior release trigger with a consolidated
workflow_run-gated release workflow that opens/updates the “Version Packages” PR and, on merge, builds/signs binaries and creates the GitHub Release.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
RELEASING.md |
Documents the new Changesets-driven, CI-managed release process and supply-chain policies. |
pnpm-workspace.yaml |
Adds pnpm workspace + hardening settings (cooldown, no lifecycle scripts). |
pnpm-lock.yaml |
Commits an exact dependency lockfile for the release tooling. |
package.json |
Adds a private JS package solely for versioning/changelog automation (Changesets + scripts). |
.npmrc |
Enforces ignore-scripts=true as defense-in-depth. |
.gitignore |
Ignores node_modules/ for the newly introduced Node tooling. |
.github/workflows/release.yml |
Consolidates release automation behind successful Test Suite runs and adds Changesets PR + release creation logic. |
.changeset/release-tooling-changesets.md |
Adds the initial changeset describing adoption of the new release tooling. |
.changeset/README.md |
Provides contributor guidance for creating changesets. |
.changeset/config.json |
Configures Changesets behavior and changelog generation. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Publish SLSA build provenance (actions/attest-build-provenance, keyless via GitHub OIDC) over a SHA256SUMS checksum file; SHA256SUMS is also attached as a release asset. Adds id-token/attestations permissions to the release job. - Build all binaries with -trimpath and -s -w for reproducibility and size. - Document Go v2+ module-path discipline (a changesets `major` bump requires moving the module path to /vN) and how to verify provenance/checksums. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…chema - Add a workflow-level concurrency group so two Test Suite completions can't race on the Version Packages PR or tag/release creation. - Detect an existing release tag with `git rev-parse --verify refs/tags/...` instead of a bare ref lookup that could match a branch named v<version>. - Point the changesets config $schema at the installed @changesets/config 3.1.4. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Rewrite the Releases section: releases are now driven by changesets (pnpm changeset -> Version Packages PR -> automated tag/build/publish), replacing the manual tag + homebrew-edit steps. Link to RELEASING.md. - Document SHA256SUMS + build-provenance verification under prebuilt binaries. - Fix stale CI badge (was the non-existent "Test & Release" workflow) to point at the Test Suite workflow. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Link the interline-io/homebrew-transitland-lib tap from the README homebrew install and Releases sections. - Document `go generate ./...` as a development prerequisite (enforced by check-go-generate.yml) in the Development section. - Replace em dashes with plain punctuation across the release docs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adopt changesets to track per-PR changes and drive releases, while keeping full continuity with the existing
vX.Y.Zgit tags. Changesets uses thev-prefixed tag format for single-package repos, andpackage.jsonis seeded at the current1.3.3, so the series simply continues (v1.3.4,v1.4.0, ...).version.gois untouched — the build still embeds the version from the git tag via-ldflags -X main.tag=....Consolidated release workflow
.github/workflows/release.ymlis rewritten from arelease: createdtrigger into a single workflow triggered on Test Suite success onmain(so a release never races ahead of tests).vX.Y.Ztag and GitHub Release (notes pulled fromCHANGELOG.md, binaries attached), and dispatches the Homebrew formula update.GITHUB_TOKENcovers all in-repo steps. No new token and no permission changes are required — the existing GitHub App token is used only for the cross-repo Homebrew dispatch, exactly as before.check-testsjob (replaced by the workflow_run gate) and the separaterelease-notesjob (notes now come from the curated changelog).Supply-chain hardening
changesets/actionv1.9.0,pnpm/action-setupv6.0.8,actions/setup-nodev6.4.0).package.jsonwith a committedpnpm-lock.yaml; CI installs withpnpm install --frozen-lockfile --ignore-scripts.minimumReleaseAge(3 days, strict) inpnpm-workspace.yamlkeeps freshly published versions out of the lockfile.onlyBuiltDependencies: []+.npmrcignore-scripts=true).New files
package.json,pnpm-workspace.yaml,.npmrc,pnpm-lock.yaml.changeset/config.json,.changeset/README.mdRELEASING.mdTest plan
pnpm installresolves under the cooldown and produces the committed lockfile.pnpm changeset:versionbumps1.3.3→1.3.4and writesCHANGELOG.md; confirmed the resulting tag name would bev1.3.4(continuous with history). Test mutations reverted.version.gois unchanged andgo build ./...still succeeds.🤖 Generated with Claude Code
Update: build provenance, checksums, trimpath, v2 docs
Following a review of Go release best practices, this PR also adds:
actions/attest-build-provenance(keyless, GitHub OIDC + Sigstore), attested over a checksums file. Verify withgh attestation verify <file> --repo interline-io/transitland-lib.SHA256SUMSattached as a release asset (sha256sum -c SHA256SUMS).-trimpath+-s -won all three builds for reproducibility and smaller binaries.RELEASING.mdnow documents Go v2+ module-path discipline (a changesetsmajorbump requires moving the module path to/vN— not just a tag) and provenance/checksum verification.These don't change artifact names, so the Homebrew formula is unaffected.
Deferred to future PRs / issues (noted from the same review, need product or coordination decisions):
modernc.org/sqlite) to drop theCGO_ENABLED=1requirement and unlock cross-compilation.tar.gz/ziparchives + coordinated Homebrew formula update.anchore/sbom-action+attest-sbom).open-pull-requests-limit: 0) and add the npm/pnpm ecosystem, or switch to Renovate for native cooldown + SHA-pin bumps.