Skip to content

Commit

Permalink
Add publish script to release workflow (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
toddkao authored Aug 30, 2024
1 parent 882a36e commit b120caf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish web component
if: steps.changesets.outputs.published == 'true'
continue-on-error: true
run: |
git pull origin main
cd packages/widget
yarn publish:web-component
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion packages/widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"prepack": "yarn run pre",
"postpack": "yarn run post",
"pre": "npm run build && node scripts/prepublish.cjs",
"post": "git checkout -- package.json && npm run publish:web-component"
"post": "git checkout -- package.json"
},
"peerDependencies": {
"react": "17.x || 18.x",
Expand Down

0 comments on commit b120caf

Please sign in to comment.