Skip to content

Commit

Permalink
ci: check npm token before publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
ocavue committed Jul 27, 2024
1 parent 559251d commit e9a0948
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
publish:
runs-on: ubuntu-latest
needs: [version]
if: ${{ needs.version.outputs.release_created }}
# if: ${{ needs.version.outputs.release_created }}
steps:
- uses: actions/checkout@v4

Expand All @@ -28,6 +28,17 @@ jobs:
- name: Build
run: yarn run build

- name: Check NPM_TOKEN
run: |
if [ -z "$NPM_TOKEN" ]; then
echo "NPM_TOKEN is not set"
exit 1
else
echo "NPM_TOKEN is set"
fi
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish to NPM
run: yarn publish
env:
Expand Down

0 comments on commit e9a0948

Please sign in to comment.