diff --git a/.claude/AUTOMATED_WORKFLOWS.md b/.claude/AUTOMATED_WORKFLOWS.md index 1ece2a9c..3a62252d 100644 --- a/.claude/AUTOMATED_WORKFLOWS.md +++ b/.claude/AUTOMATED_WORKFLOWS.md @@ -31,13 +31,15 @@ git commit -m "feat(abacus-react)!: change callback signature" **Workflow Details**: - **File**: `.github/workflows/publish-abacus-react.yml` - **Triggers**: Push to main branch with changes in `packages/abacus-react/` -- **Steps**: Install deps → Build package → Run tests → Semantic release → Publish to npm +- **Steps**: Install deps → Build package → Run tests → Configure dual auth → Semantic release → Publish to npm + GitHub Packages - **Versioning**: Independent from monorepo (uses tags like `abacus-react-v1.2.3`) +- **Publishing**: Dual publishing to both npm and GitHub Packages simultaneously **Current Status**: -- ✅ Workflow configured -- ✅ Semantic release setup +- ✅ Workflow configured for dual publishing +- ✅ Semantic release setup for both registries - ✅ Package build/test passing +- ✅ GitHub Packages authentication configured (uses GITHUB_TOKEN) - ⏸️ Awaiting NPM_TOKEN secret for actual npm publishing **What Claude should do**: diff --git a/.github/workflows/publish-abacus-react.yml b/.github/workflows/publish-abacus-react.yml index f88392fb..b8ae9d9e 100644 --- a/.github/workflows/publish-abacus-react.yml +++ b/.github/workflows/publish-abacus-react.yml @@ -59,6 +59,13 @@ jobs: - name: Run tests run: pnpm --filter @soroban/abacus-react test:run || echo "Tests currently failing due to vitest config issue - will fix in follow-up" + - name: Configure npm for dual publishing + working-directory: packages/abacus-react + run: | + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc + echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc + echo "@soroban:registry=https://npm.pkg.github.com" >> .npmrc + - name: Semantic Release working-directory: packages/abacus-react env: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d41b2bf2..4fb6f007 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -87,10 +87,11 @@ BREAKING CHANGE: callback functions now receive different parameters #### Package Release Workflow -1. **Automatic**: Any commit to `main` branch with `(abacus-react)` scope triggers npm publishing -2. **Manual testing**: From `packages/abacus-react/`, run `pnpm release:dry-run` -3. **Version tags**: Package releases are tagged as `abacus-react-v1.2.3` (separate from monorepo versions) -4. **npm publishing**: Requires `NPM_TOKEN` secret in repository settings +1. **Automatic**: Any commit to `main` branch with `(abacus-react)` scope triggers publishing +2. **Dual publishing**: Package is published to both npm and GitHub Packages simultaneously +3. **Manual testing**: From `packages/abacus-react/`, run `pnpm release:dry-run` +4. **Version tags**: Package releases are tagged as `abacus-react-v1.2.3` (separate from monorepo versions) +5. **Authentication**: Requires `NPM_TOKEN` secret for npm and uses `GITHUB_TOKEN` for GitHub Packages #### Important Notes diff --git a/README.md b/README.md index 79261b9d..5117b78f 100644 --- a/README.md +++ b/README.md @@ -700,7 +700,7 @@ curl http://localhost:8000/health ### 📦 NPM Package Publishing -The `@soroban/abacus-react` package is automatically published to npm using semantic versioning. To trigger a release: +The `@soroban/abacus-react` package is automatically published to **both npm and GitHub Packages** using semantic versioning. To trigger a release: ```bash # For new features (minor version bump)