feat(abacus-react): add dual publishing to npm and GitHub Packages
- Configure semantic-release for simultaneous publishing to both registries - Update GitHub Actions workflow with dual authentication setup - Add npm configuration for both registry.npmjs.org and npm.pkg.github.com - Update package.json with correct repository URL and registry config - Enhance documentation across README, CONTRIBUTING.md, and .claude/ files - GitHub Packages uses GITHUB_TOKEN, npm requires NPM_TOKEN secret This provides redundancy and choice for package consumers while maintaining the same automatic semantic versioning workflow.
This commit is contained in:
parent
f923b53a44
commit
242ee523ed
|
|
@ -45,6 +45,15 @@
|
|||
"npmPublish": true
|
||||
}
|
||||
],
|
||||
[
|
||||
"@semantic-release/npm",
|
||||
{
|
||||
"npmPublish": true,
|
||||
"pkgRoot": ".",
|
||||
"tarballDir": "dist",
|
||||
"registry": "https://npm.pkg.github.com"
|
||||
}
|
||||
],
|
||||
[
|
||||
"@semantic-release/github",
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ A comprehensive React component for rendering interactive Soroban (Japanese abac
|
|||
|
||||
## Installation
|
||||
|
||||
### From npm (recommended)
|
||||
|
||||
```bash
|
||||
npm install @soroban/abacus-react
|
||||
# or
|
||||
|
|
@ -24,6 +26,18 @@ pnpm add @soroban/abacus-react
|
|||
yarn add @soroban/abacus-react
|
||||
```
|
||||
|
||||
### From GitHub Packages
|
||||
|
||||
```bash
|
||||
# Configure npm to use GitHub Packages for @soroban scope
|
||||
echo "@soroban:registry=https://npm.pkg.github.com" >> .npmrc
|
||||
|
||||
# Then install
|
||||
npm install @soroban/abacus-react
|
||||
```
|
||||
|
||||
The package is published to both npm and GitHub Packages simultaneously for redundancy and choice.
|
||||
|
||||
## Quick Start
|
||||
|
||||
|
||||
|
|
@ -404,8 +418,9 @@ BREAKING CHANGE: callback functions now receive different parameters
|
|||
### Release Process
|
||||
|
||||
1. **Automatic**: Releases happen automatically when changes are pushed to `main` branch
|
||||
2. **Manual testing**: Run `pnpm release:dry-run` to test release without publishing
|
||||
3. **Version tags**: Releases are tagged as `abacus-react-v1.2.3` (separate from monorepo versions)
|
||||
2. **Dual publishing**: Package is published to both npm and GitHub Packages simultaneously
|
||||
3. **Manual testing**: Run `pnpm release:dry-run` to test release without publishing
|
||||
4. **Version tags**: Releases are tagged as `abacus-react-v1.2.3` (separate from monorepo versions)
|
||||
|
||||
### Development Commands
|
||||
|
||||
|
|
|
|||
|
|
@ -89,13 +89,14 @@
|
|||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/soroban-flashcards/soroban-abacus-flashcards",
|
||||
"url": "https://github.com/antialias/soroban-abacus-flashcards",
|
||||
"directory": "packages/abacus-react"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
"access": "public",
|
||||
"registry": "https://registry.npmjs.org"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue