From b90bff2bca12192b472ed2a5c2213745047780e1 Mon Sep 17 00:00:00 2001 From: Charles Francoise Date: Tue, 3 Dec 2024 15:15:44 +0100 Subject: [PATCH] ci: publish to NPM on release (#10) --- .github/workflows/release-please.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 7158871..50fe648 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -13,6 +13,27 @@ jobs: release-please: runs-on: ubuntu-latest steps: - - uses: googleapis/release-please-action@v4 + - name: Release please + id: release + uses: googleapis/release-please-action@v4 with: token: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout + if: ${{ steps.release.outputs.release_created }} + uses: actions/checkout@v4 + - name: Setup node + if: ${{ steps.release.outputs.release_created }} + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + - name: Install dependencies + if: ${{ steps.release.outputs.release_created }} + shell: sh + run: npm ci + - name: Publish to NPM registry + if: ${{ steps.release.outputs.release_created }} + run: npm publish + shell: sh + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}