Skip to content

Commit

Permalink
Update npm-publish-github-packages.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
32teeth authored Sep 11, 2024
1 parent de10b7d commit cadbaa7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
permissions:
contents: read
packages: write
outputs:
publish_status: ${{ steps.publish-step.outputs.publish_status }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -43,16 +45,16 @@ jobs:
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues \
-d "{\"title\": \"Publish Conflict\", \"body\": \"Attempted to publish over an existing version. Error details: \\n\\n$ERROR_MESSAGE\"}"
echo "publish_status=skipped" >> $GITHUB_ENV
echo "::set-output name=publish_status::skipped"
else
echo "publish_status=success" >> $GITHUB_ENV
echo "::set-output name=publish_status::success"
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

notify:
needs: publish
runs-on: ubuntu-latest
if: ${{ env.publish_status == 'skipped' }}
if: ${{ needs.publish.outputs.publish_status == 'skipped' }}
steps:
- run: echo "The publish step was skipped due to a version conflict."

0 comments on commit cadbaa7

Please sign in to comment.