chore: publish to npm with release-please (#3051)

This commit is contained in:
Chengzhong Wu 2024-07-22 17:39:31 +08:00 committed by GitHub
parent d22e2eb080
commit 8319847363
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,3 +32,17 @@ jobs:
needs: [ release-please ]
if: needs.release-please.outputs.pr || startsWith(github.head_ref, 'release-please--')
uses: ./.github/workflows/tests.yml
npm-publish:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: 'https://registry.npmjs.org'
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}