Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 9, 2025

This PR implements an automated npm publishing workflow using @googleapis/release-please to streamline the release process for oxc-walker.

Overview

The new workflow replaces the current manual release process (bumpp && pnpm publish) with a fully automated system that:

  1. Automatically creates release PRs when code is pushed to main
  2. Publishes to npm and creates GitHub releases when release PRs are merged

Implementation Details

Release Please Workflow (.github/workflows/release-please.yml)

  • Triggers on pushes to the main branch
  • Uses @googleapis/release-please-action@v4 configured for Node.js projects
  • Analyzes conventional commits to determine version bumps
  • Creates/updates release PRs with updated package.json and generated CHANGELOG.md

Publish Workflow (.github/workflows/publish.yml)

  • Triggers when version tags (v*) are created (when release PRs are merged)
  • Runs the full CI pipeline: install dependencies → build → test
  • Publishes to npm with public access using pnpm publish
  • Creates GitHub releases with auto-generated release notes

Benefits

  • Zero-maintenance releases: No more manual version bumping or changelog updates
  • Consistent versioning: Follows semantic versioning based on conventional commits
  • Quality assurance: All releases are tested and built before publishing
  • Full automation: From commit to npm package without manual intervention

Setup Requirements

To enable the workflow, repository administrators need to:

  • Add NPM_TOKEN secret containing an npm authentication token with publish permissions

Backward Compatibility

This change is fully backward compatible:

  • All existing scripts and build processes remain unchanged
  • The manual pnpm run release script continues to work for emergency releases
  • No changes to the package structure or build output

The workflow integrates seamlessly with the existing pnpm + TypeScript + vitest setup and maintains all current quality checks.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Add a npm publish workflow: * uses @googleapis/release-please that creates a release PR, the release please PR updates package.json version * when the release PR is merged, publish the npm package and create a github release Add automated npm publish workflow with release-please Sep 9, 2025
@Copilot Copilot AI requested a review from Boshen September 9, 2025 04:03
Copilot finished work on behalf of Boshen September 9, 2025 04:03
@Boshen Boshen force-pushed the copilot/add-npm-publish-workflow branch from 033a539 to 063b2d1 Compare September 13, 2025 14:10
@Boshen Boshen marked this pull request as ready for review September 13, 2025 14:10
@Boshen Boshen force-pushed the copilot/add-npm-publish-workflow branch from 063b2d1 to a5d3b86 Compare September 13, 2025 14:12
@Boshen Boshen merged commit 7f84714 into main Sep 13, 2025
5 checks passed
@Boshen Boshen deleted the copilot/add-npm-publish-workflow branch September 13, 2025 14:13
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