We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec92923 commit 7e9a2ccCopy full SHA for 7e9a2cc
1 file changed
.github/workflows/npm-publish.yml
@@ -30,6 +30,13 @@ jobs:
30
- name: Publish to npm
31
run: |
32
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
33
- yarn publish --non-interactive
+ yarn publish --non-interactive || {
34
+ if grep -q "You cannot publish over the previously published versions" <<< "$(cat /home/runner/.npm/_logs/*-debug-0.log)"; then
35
+ echo "Version already exists on npm - treating as success"
36
+ exit 0
37
+ else
38
+ exit 1
39
+ fi
40
+ }
41
env:
42
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
0 commit comments