Skip to content

Release with Changesets and npm trusted publishing - #73

Merged
Sam Beveridge (00salmon) merged 2 commits into
masterfrom
release/changesets-trusted-publishing
Nov 4, 2026
Merged

Sam Beveridge (00salmon) merged 2 commits into
masterfrom
release/changesets-trusted-publishing

Conversation

@00salmon

Copy link
Copy Markdown
Contributor

Mirrors the mint-components release loop:

  • Pushes to master open/update a "Version Packages" PR from pending changesets; merging it publishes to npm (OIDC, provenance) and creates the v tag and GitHub release.
  • A manual dispatch publishes a snapshot of the selected branch under the next dist-tag without committing or tagging.

Differences from mint-components, each deliberate:

  • The build runs before changesets/action, which writes the repo-write GITHUB_TOKEN to ~/.netrc for the rest of the job.
  • version-packages updates the lockfile with --package-lock-only --ignore-scripts instead of a full npm install with scripts.
  • Publishing jobs use the npm (master) and npm-prerelease GitHub environments so the npm trusted publisher can be bound to them.

Also replaces np, blocks laptop publishes via prepublishOnly, and regenerates the lockfile with npm 11 (required for trusted publishing) so the first Version PR isn't a lockfile reformat.

Description of the change

Description here

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation or Development tools (readme, specs, tests, code formatting)

Links

  • Jira issue number: (PUT IT HERE)
  • Process.st launch checklist: (PUT IT HERE)

Checklists

Development

  • Prettier was run (if applicable)
  • The behaviour changes in the pull request are covered by specs
  • All tests related to the changed code pass in development

Paperwork

  • This pull request has a descriptive title and information useful to a reviewer
  • This pull request has a Jira number
  • This pull request has a Process.st launch checklist

Code review

  • Changes have been reviewed by at least one other engineer
  • Security impacts of this change have been considered

Mirrors the mint-components release loop:
- Pushes to master open/update a "Version Packages" PR from pending
  changesets; merging it publishes to npm (OIDC, provenance) and
  creates the v<version> tag and GitHub release.
- A manual dispatch publishes a snapshot of the selected branch under
  the `next` dist-tag without committing or tagging.

Differences from mint-components, each deliberate:
- The build runs before changesets/action, which writes the repo-write
  GITHUB_TOKEN to ~/.netrc for the rest of the job.
- `version-packages` updates the lockfile with --package-lock-only
  --ignore-scripts instead of a full `npm install` with scripts.
- Publishing jobs use the `npm` (master) and `npm-prerelease` GitHub
  environments so the npm trusted publisher can be bound to them.

Also replaces np, blocks laptop publishes via prepublishOnly, and
regenerates the lockfile with npm 11 (required for trusted publishing)
so the first Version PR isn't a lockfile reformat.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 3, 2026 23:45
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

A preview of 3ea3c03 is uploaded and can be seen here:

✨ https://saasquatch.github.io/squatch-js/pull/73 ✨

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

size-limit report 📦

Path Size
dist/squatch.js 13 KB (0%)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The release action’s output detection is incompatible with Changesets CLI 3.0.3, so npm publishing can succeed without pushing version tags or creating GitHub releases.

1 open issue
What changed in this PR

Moves @saasquatch/squatch-js releases from local np publishing to Changesets and GitHub Actions with npm trusted publishing and provenance.

Changes:

  • Adds automated version PRs and stable publishing, plus manually triggered snapshots under next.
  • Replaces release scripts and dependencies, adds a local-publish guard, and regenerates the lockfile with npm 11.
  • Documents the release process and prepares the changelog for Changesets-generated entries.
File Description
package.json Adds Changesets scripts, dependencies, and publishing settings; removes np.
package-lock.json Updates the dependency tree for the release-tool migration.
CONTRIBUTING.md Documents stable releases, snapshots, and version selection.
CHANGELOG.md Marks the transition to Changesets-generated release notes.
.github/​workflows/​release.yml Adds stable and snapshot release jobs using trusted publishing.
.changeset/​README.md Provides links to Changesets documentation.
.changeset/​config.json Configures changelogs, the base branch, and snapshot version naming.

Review effort: Balanced

Comment thread .github/workflows/release.yml Resolved
Copilot AI balanced review requested due to automatic review settings November 4, 2026 18:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The stable and snapshot OIDC publishing paths depend on unavailable external npm and GitHub environment configuration, requiring maintainer verification and validation in GitHub Actions before approval.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@00salmon
Sam Beveridge (00salmon) merged commit e257020 into master Nov 4, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants