feat(abacus-react): implement GitHub Packages-only publishing workflow
- Disable npm publishing in semantic-release to avoid npm token requirement - Use semantic-release for versioning, tagging, and GitHub releases only - Add separate step to publish to GitHub Packages after version is created - Configure npm registry specifically for GitHub Packages publishing - This bypasses semantic-release npm plugin limitations while maintaining automation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
6e5b4ec7bf
commit
b194599f60
|
|
@ -59,16 +59,26 @@ 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 GitHub Packages only
|
||||
- name: Semantic Release (versioning only)
|
||||
working-directory: packages/abacus-react
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: npx semantic-release
|
||||
|
||||
- name: Configure npm for GitHub Packages
|
||||
working-directory: packages/abacus-react
|
||||
run: |
|
||||
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc
|
||||
echo "@soroban:registry=https://npm.pkg.github.com" >> .npmrc
|
||||
echo "registry=https://npm.pkg.github.com" >> .npmrc
|
||||
|
||||
- name: Semantic Release
|
||||
- name: Publish to GitHub Packages
|
||||
working-directory: packages/abacus-react
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_CONFIG_REGISTRY: https://npm.pkg.github.com
|
||||
NPM_REGISTRY: https://npm.pkg.github.com
|
||||
run: npx semantic-release
|
||||
run: |
|
||||
# Only publish if semantic-release created a new version
|
||||
if git tag --list | grep -q "abacus-react-v"; then
|
||||
echo "Publishing to GitHub Packages..."
|
||||
npm publish
|
||||
else
|
||||
echo "No new version to publish"
|
||||
fi
|
||||
|
|
@ -42,9 +42,7 @@
|
|||
[
|
||||
"@semantic-release/npm",
|
||||
{
|
||||
"npmPublish": true,
|
||||
"pkgRoot": ".",
|
||||
"tarballDir": "dist"
|
||||
"npmPublish": false
|
||||
}
|
||||
],
|
||||
[
|
||||
|
|
|
|||
Loading…
Reference in New Issue