fix(publish): remove empty token env and improve auth diagnostics
This commit is contained in:
parent
7bc2b5e0e0
commit
c8f5b60598
|
|
@ -79,7 +79,15 @@ jobs:
|
|||
echo " actor: ${{ github.actor }}"
|
||||
echo " selected_channel: ${{ inputs.channel || 'n/a' }}"
|
||||
echo " selected_bump: ${{ inputs.bump || 'n/a' }}"
|
||||
echo " node_auth_token_present: $([ -n \"$NODE_AUTH_TOKEN\" ] && echo yes || echo no)"
|
||||
if [ "${NODE_AUTH_TOKEN+x}" = "x" ]; then
|
||||
if [ -n "$NODE_AUTH_TOKEN" ]; then
|
||||
echo " node_auth_token_state: set-nonempty"
|
||||
else
|
||||
echo " node_auth_token_state: set-empty"
|
||||
fi
|
||||
else
|
||||
echo " node_auth_token_state: unset"
|
||||
fi
|
||||
|
||||
WORKFLOW_FILE=$(node -e "
|
||||
const ref = process.argv[1] || '';
|
||||
|
|
@ -174,16 +182,10 @@ jobs:
|
|||
- name: Publish prerelease to npm
|
||||
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.channel == 'next')
|
||||
run: npm publish --tag next --provenance
|
||||
env:
|
||||
NPM_CONFIG_USERCONFIG: /dev/null
|
||||
NODE_AUTH_TOKEN: ""
|
||||
|
||||
- name: Publish stable release to npm
|
||||
if: github.event_name == 'workflow_dispatch' && inputs.channel == 'latest'
|
||||
run: npm publish --tag latest --provenance
|
||||
env:
|
||||
NPM_CONFIG_USERCONFIG: /dev/null
|
||||
NODE_AUTH_TOKEN: ""
|
||||
|
||||
- name: Print npm debug logs
|
||||
if: always()
|
||||
|
|
|
|||
Loading…
Reference in New Issue