Commit fa5bdce2 authored by Will Cory's avatar Will Cory Committed by GitHub

chore: Add warning if npm token is not set in changeset workflow (#9297)

Co-authored-by: default avatarWill Cory <willcory@Wills-MacBook-Pro.local>
parent 14b7243b
......@@ -29,6 +29,11 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Verify NPM Token is valid
run: npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish snapshots
uses: seek-oss/changesets-snapshot@v0
with:
......
......@@ -41,11 +41,23 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
- name: Check if NPM_TOKEN is set
id: check_token
run: |
if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
echo "NPM_TOKEN is not set. Is it set it in your repository secrets?"
exit 1
fi
shell: bash
- name: Set deployment token
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Verify NPM Token is valid
run: npm whoami
# Makes a pr to publish the changesets that when
# merged will publish to npm
# see https://github.com/changesets/action
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment