Skip to content

Commit

Permalink
fix: exit if already published to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
iowillhoit committed Jun 11, 2024
1 parent fc2f2d4 commit a57033b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/npmPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: echo "published said ${{ steps.is-published.outputs.published }}"

fail-if-published:
needs: [check-publish]
if: needs.check-publish.outputs.published == 'true'
uses: actions/github-script@v7
with:
script: core.setFailed("The version '${{ inputs.githubTag }}' has already been published to npm")

ctc-open:
needs: [check-publish]
if: inputs.ctc && needs.check-publish.outputs.published == 'false'
Expand Down

0 comments on commit a57033b

Please sign in to comment.