Skip to content

Commit f80ba48

Browse files
authored
fix: exit if already published to npm (#111)
1 parent fc2f2d4 commit f80ba48

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/npmPublish.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ jobs:
7676
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7777
- run: echo "published said ${{ steps.is-published.outputs.published }}"
7878

79+
fail-if-published:
80+
needs: [check-publish]
81+
if: needs.check-publish.outputs.published == 'true'
82+
uses: actions/github-script@v7
83+
with:
84+
script: core.setFailed("The version '${{ inputs.githubTag }}' has already been published to npm")
85+
7986
ctc-open:
8087
needs: [check-publish]
8188
if: inputs.ctc && needs.check-publish.outputs.published == 'false'

0 commit comments

Comments
 (0)