Skip to content

Commit

Permalink
chore: enable dual publish to GitHub (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-guan authored Aug 6, 2024
1 parent 936034b commit 240c029
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/publish-react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
- beta
- latest

permissions:
id-token: write
packages: write

jobs:
publish:
runs-on: ubuntu-latest
Expand All @@ -26,10 +30,17 @@ jobs:
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: "16.x"
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run build
- run: npm publish --tag ${{ github.ref_name }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
registry-url: "https://npm.pkg.github.com/"
- run: npm publish --tag ${{ github.ref_name }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 240c029

Please sign in to comment.