From f33dc9995295a580659a7a61a87958e0bf55887b Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Fri, 19 Jul 2024 19:47:15 +0100 Subject: [PATCH] chore: publish to npm with release-please --- .github/workflows/release-please.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 6b44256ea9..7a37a1fc2b 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -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 }}