FIX: Try a boolean argument for the CI instead

This commit is contained in:
Nicolás Hatcher
2025-01-27 17:53:18 +01:00
committed by Nicolás Hatcher Andrés
parent 0f6d311de2
commit d3bc8b135c

View File

@@ -12,11 +12,7 @@ permissions:
publish:
description: "Publish to npm"
required: true
type: choice
options:
- yes
- no
default: "no"
type: boolean
defaults:
run:
working-directory: ./bindings/nodejs
@@ -437,10 +433,13 @@ jobs:
shell: bash
- name: Publish
run: |
cd bindings/nodejs
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
npm publish --access public
echo "Published to npm"
else
echo "Not a release, skipping publish"
fi