Skip to content

ci: add changesets release workflow#13

Merged
raphaelsalaja merged 1 commit intomainfrom
ci/changesets-release
Apr 26, 2026
Merged

ci: add changesets release workflow#13
raphaelsalaja merged 1 commit intomainfrom
ci/changesets-release

Conversation

@raphaelsalaja
Copy link
Copy Markdown
Owner

Summary

Adds .github/workflows/release.yml so we can stop running pnpm publish-packages by hand.

How it works

On every push to main:

  1. If there are unreleased changesets (like the one in feat(audio): add jitter option for per-voice pitch/volume/rate variance #12), the workflow opens or updates a "Version Packages" PR that bumps versions, writes CHANGELOG entries, and deletes the consumed changeset files.
  2. When the Version Packages PR is merged, the same workflow runs again on main, detects that versions changed, and runs pnpm changeset publish to publish @web-kits/audio to npm (with provenance).

Only @web-kits/audio is non-private, so it's the only package that will be published.

Requirements

  • NPM_TOKEN repo secret with publish rights to @web-kits/audio \u2014 already added.
  • GITHUB_TOKEN \u2014 auto-provided by Actions.
  • The job has contents: write / pull-requests: write so Changesets can commit version bumps and open the PR, and id-token: write so npm provenance works.

Related

Test plan

Made with Cursor

Runs on pushes to main. When unreleased changesets are present, opens or
updates a "Version Packages" PR that bumps versions and consumes the
changesets. When that PR merges, the workflow publishes the updated
packages to npm with provenance.

Made-with: Cursor
Copilot AI review requested due to automatic review settings April 26, 2026 19:03
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
audio Ready Ready Preview, Comment Apr 26, 2026 7:03pm

Request Review

@raphaelsalaja raphaelsalaja merged commit 544b894 into main Apr 26, 2026
5 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an automated Changesets-based release workflow to version packages via PRs and publish to npm on pushes to main, replacing the current manual pnpm publish-packages process.

Changes:

  • Introduces a Release GitHub Actions workflow triggered on pushes to main.
  • Runs Changesets to either open/update a “version packages” PR or publish packages to npm (with provenance).
  • Grants the workflow permissions required to create PRs/commits and request an OIDC token for provenance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +35 to +36
- run: pnpm build

Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

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

pnpm build runs turbo run build across the whole monorepo. In this repo, apps/marketing has a prebuild that regenerates tracked files under apps/marketing/src/generated/*, so running build here can dirty the workspace and accidentally include unrelated generated diffs in the Changesets version PR/publish commit. Consider removing this step, or scoping the build to the publishable package(s) (e.g., only @web-kits/audio) and/or running build only when actually publishing.

Suggested change
- run: pnpm build

Copilot uses AI. Check for mistakes.
title: "chore(release): version packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

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

The workflow configures actions/setup-node with registry-url, which typically relies on NODE_AUTH_TOKEN for npm auth. This job only exports NPM_TOKEN (and there is no .npmrc in-repo referencing NPM_TOKEN), so pnpm changeset publish may run without credentials. Consider also setting NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} (or adding an .npmrc that uses NPM_TOKEN) so publishing is reliably authenticated.

Suggested change
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Copilot uses AI. Check for mistakes.
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.

2 participants