fix: use changeset publish to enable GitHub release creation#8
fix: use changeset publish to enable GitHub release creation#8
Conversation
The custom release script used npm publish which doesn't output "New tag:" that changesets/action parses to detect published packages and create GitHub releases. Replaced with bunx changeset publish which provides the expected output format. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: d584448 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
This PR modernizes the package publishing workflow by replacing a custom npm publish script with the standard changeset publish command. This change enables automatic GitHub release creation, which was previously failing because the custom script didn't output the format expected by changesets/action.
Key Changes:
- Switch from custom
bash scripts/release.shtobunx changeset publishin the version workflow - Remove the now-redundant
scripts/release.shfile - Add a changeset documenting the fix
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/version.yml |
Updated publish command to use bunx changeset publish instead of custom script |
scripts/release.sh |
Removed custom release script as version checking is now handled by changeset publish |
.changeset/swift-doors-glow.md |
Added changeset documentation for this fix |
Comments suppressed due to low confidence (1)
.github/workflows/version.yml:41
- The workflow is missing the NPM authentication token required for publishing. When using
changeset publish, you need to provide eitherNODE_AUTH_TOKENorNPM_TOKENin the environment variables. Sinceactions/setup-node@v4is configured withregistry-url, addNODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}to the env section alongside GITHUB_TOKEN.
publish: bunx changeset publish
title: 'chore: version packages'
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## barkql@0.1.3 ### Patch Changes - [#8](#8) [`8817ef3`](8817ef3) Thanks [@eli0shin](https://github.com/eli0shin)! - Fix GitHub releases not being created by using `changeset publish` instead of a custom npm publish script, which provides the expected "New tag:" output format that changesets/action parses. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
changeset publishcommandProblem
The custom release script (scripts/release.sh) used
npm publishdirectly, which doesn't output the "New tag:" format that changesets/action expects. The changesets/action parses this specific output to detect newly published packages and automatically create GitHub releases. Without this output format, GitHub releases were not being created even though packages were successfully published to npm.Solution
Switched from the custom
bash scripts/release.shto usingbunx changeset publishin the version workflow. The changeset publish command:This simplifies the workflow by removing the custom script and leveraging changesets' built-in publishing mechanism that integrates properly with the changesets/action's release creation feature.
Changes
.github/workflows/version.ymlto usebunx changeset publishinstead of custom scriptscripts/release.shsince version checking is handled by changeset publish🤖 Generated with Claude Code