From 570dac3bb5b679ec84315f3f08a588f011217d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Carrasco?= Date: Sun, 3 Dec 2023 18:51:44 +0000 Subject: [PATCH] fix: publish npm package on successful release-please execution (#200) --- .github/workflows/release-please.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index b2a3bea18..6822c56e5 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -13,13 +13,18 @@ permissions: jobs: release-please: runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release.outputs.release_created }} steps: - uses: google-github-actions/release-please-action@v3 # Handle local releases id: release with: release-type: node package-name: openbim-components - - uses: ./.github/workflows/publish-npm.yml # Publish to npmjs - with: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - if: ${{ steps.release.outputs.release_created }} \ No newline at end of file + publish-npm: + needs: release-please + if: ${{ needs.release-please.outputs.release_created }} + uses: ./.github/workflows/publish-npm.yml # Publish to npmjs + secrets: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + # Publish only if release-please creates a published release