feat: Add GitHub Actions workflow for dual registry publishing with changeset support #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a comprehensive GitHub Actions workflow system that automatically publishes packages to both npmjs.com and GitHub Packages using Changesets for version management, addressing the need for reliable dual-registry publishing with proper safeguards and explicit version control.
Key Features
🔄 Dual Registry Publishing
📦 Changeset Integration
🛡️ Robust Safeguards
🔒 Security & Compliance
contents: read,packages: write,id-token: write)🧪 Testing & Validation
test-publish-workflow.sh) to validate workflow stepsChangeset Workflow
The new changeset-based workflow provides better control over versioning compared to Lerna's conventional commits:
npm run changesetto specify version bump type and changelogUsage
Primary Changeset Workflow
Legacy Release Workflow
Implementation Details
The workflow handles existing TypeScript build issues gracefully - when
npm run buildfails due to type definition conflicts, it falls back to the esbuild-only build process that generates the required CommonJS and ESM bundles. This ensures publishing can proceed even with compilation errors.Repository secrets required:
NPM_TOKEN: NPM automation token for npmjs.com publishingGITHUB_TOKEN: Automatically provided for GitHub PackagesComplete documentation is included at
.github/PUBLISH_WORKFLOW.mdand.changeset/USAGE.mdwith setup instructions, troubleshooting, and maintenance guidelines.Fixes #38.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.