Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 22, 2025

Overview

This PR adds a release script to streamline the release workflow, bumps the package version to 1.6.3, and adds automatic NPM publishing on PR merge to main.

Changes

Version Bump

  • Updated package version from 1.6.2 to 1.6.3 in package.json

New Release Script

Added a new release script to package.json that combines the build and publish steps:

"scripts": {
  "build": "bunx tsc",
  "release": "bun run build && npm publish"
}

This allows maintainers to build and publish the package in a single command:

bun run release

The script will:

  1. Build the TypeScript source code using bunx tsc
  2. Publish the compiled package to the NPM registry

Automatic NPM Publishing

Added a new GitHub Actions workflow (.github/workflows/publish-npm.yml) that automatically publishes to NPM when PRs are merged to main. The workflow:

  • Triggers on PR merge to main branch
  • Sets up Bun and Node.js environments
  • Installs dependencies and builds the project
  • Publishes to NPM with provenance support

Note: Repository owner needs to add an NPM_TOKEN secret to GitHub repository settings for automatic publishing to work.

Documentation

  • Updated CHANGELOG.md with a new entry for version 1.6.3 documenting the addition of the release script, automatic publishing workflow, and version bump

Benefits

  • Streamlined Workflow: Reduces the manual steps required to publish a new release
  • Consistency: Ensures the build step always runs before publishing, preventing incomplete releases
  • Automation: Automatic publishing on PR merge reduces manual intervention and potential errors
  • Developer Experience: Simplifies the release process with a single command or automatic workflow

Testing

  • ✅ Build process verified and working correctly
  • ✅ Dry-run test of release script successful
  • ✅ Workflow syntax validated
  • ✅ No security vulnerabilities introduced
Original prompt

I need to bump and do another release with bun run publish


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Bump version and create another release Bump version to 1.6.3 and add publish script for streamlined releases Oct 22, 2025
Copilot AI requested a review from delorenj October 22, 2025 22:30
Copy link
Owner

@delorenj delorenj left a comment

Choose a reason for hiding this comment

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

This is great but can we even make it more Automatic by creating a workflow on PR merged into master or Main rather

@delorenj delorenj requested review from delorenj and removed request for delorenj October 24, 2025 13:12
@delorenj delorenj marked this pull request as ready for review December 9, 2025 22:13
Copilot AI review requested due to automatic review settings December 9, 2025 22:13
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

package.json Outdated
"scripts": {
"build": "bunx tsc"
"build": "bunx tsc",
"publish": "bun run build && npm publish"

Choose a reason for hiding this comment

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

P1 Badge Publish script recursively re-invokes npm publish

The new publish script runs npm publish from within a script that itself is the npm publish lifecycle hook. When you execute bun run publish (or npm publish), npm will run the publish lifecycle, hit this script, and re-run npm publish again, leading to an endless publish loop or repeated publish attempts that fail once the first upload completes (e.g., EPUBLISHCONFLICT). This makes the release command unusable.

Useful? React with 👍 / 👎.

Copy link
Owner

Choose a reason for hiding this comment

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

@codex implement

Choose a reason for hiding this comment

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

Copy link
Contributor

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

This PR bumps the package version to 1.6.3 and introduces a convenience script for streamlined releases.

  • Version updated from 1.6.2 to 1.6.3
  • New publish script added to automate build and publish workflow
  • CHANGELOG.md updated with version 1.6.3 entry

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
package.json Updated version to 1.6.3 and added new publish script that combines build and npm publish steps
CHANGELOG.md Added version 1.6.3 changelog entry documenting the publish script addition and version bump

@delorenj
Copy link
Owner

@copilot apply changes based on the comments in this thread

Co-authored-by: Copilot <[email protected]>
- Updated CHANGELOG.md to reflect script rename from 'publish' to 'release'
- Added new GitHub workflow (publish-npm.yml) for automatic NPM publishing on PR merge to main
- Workflow includes proper authentication, build steps, and provenance support

Co-authored-by: delorenj <[email protected]>
Copy link
Contributor Author

Copilot AI commented Dec 10, 2025

This is great but can we even make it more Automatic by creating a workflow on PR merged into master or Main rather

Added automatic NPM publishing workflow in commit 9efb6ba. The new .github/workflows/publish-npm.yml workflow triggers automatically when PRs are merged to main. It builds the project and publishes to NPM with provenance support.

- Remove redundant --access public flag from workflow (already in package.json)
- Update CHANGELOG heading from 'Build Script' to 'Release Script' for accuracy

Co-authored-by: delorenj <[email protected]>
Copilot AI changed the title Bump version to 1.6.3 and add publish script for streamlined releases Bump version to 1.6.3 and add release script with automatic publishing Dec 10, 2025
Copilot AI requested a review from delorenj December 10, 2025 21:19
Copy link
Owner

@delorenj delorenj left a comment

Choose a reason for hiding this comment

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

Added NPM_TOKEN

@delorenj delorenj merged commit c7b2847 into main Dec 10, 2025
1 check passed
@delorenj delorenj deleted the copilot/bump-release-version branch December 10, 2025 21:52
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