FIX: Try a boolean argument for the CI instead
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
0f6d311de2
commit
d3bc8b135c
11
.github/workflows/npm.yml
vendored
11
.github/workflows/npm.yml
vendored
@@ -12,11 +12,7 @@ permissions:
|
|||||||
publish:
|
publish:
|
||||||
description: "Publish to npm"
|
description: "Publish to npm"
|
||||||
required: true
|
required: true
|
||||||
type: choice
|
type: boolean
|
||||||
options:
|
|
||||||
- yes
|
|
||||||
- no
|
|
||||||
default: "no"
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: ./bindings/nodejs
|
working-directory: ./bindings/nodejs
|
||||||
@@ -437,10 +433,13 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: |
|
run: |
|
||||||
|
cd bindings/nodejs
|
||||||
npm config set provenance true
|
npm config set provenance true
|
||||||
if [ "${{ github.event.inputs.publish }}" = "yes" ]; then
|
echo "${{ github.event.inputs.publish }}"
|
||||||
|
if [ "${{ github.event.inputs.publish }}" = "true" ]; then
|
||||||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||||
npm publish --access public
|
npm publish --access public
|
||||||
|
echo "Published to npm"
|
||||||
else
|
else
|
||||||
echo "Not a release, skipping publish"
|
echo "Not a release, skipping publish"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user