Skip to content

Commit 07e7927

Browse files
committed
fix(ci): use inputs.version for npm publish check
The publish job was reading version from package.json at checkout time, which has the OLD version before the bump. Now uses inputs.version passed from release.yml which has the correct NEW version.
1 parent 5a62207 commit 07e7927

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/build-all-platforms.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,11 +525,17 @@ jobs:
525525
id: pkg
526526
run: |
527527
NAME=$(node -e "console.log(require('./npx-cli/package.json').name)")
528-
VER=$(node -e "console.log(require('./npx-cli/package.json').version)")
528+
# Use inputs.version if available (from workflow_call), otherwise read from package.json
529+
if [[ -n "${{ inputs.version }}" ]]; then
530+
VER="${{ inputs.version }}"
531+
echo "Using version from workflow input: $VER"
532+
else
533+
VER=$(node -e "console.log(require('./npx-cli/package.json').version)")
534+
echo "Using version from package.json: $VER"
535+
fi
529536
echo "name=$NAME" >> $GITHUB_OUTPUT
530537
echo "version=$VER" >> $GITHUB_OUTPUT
531-
echo "Package: $NAME"
532-
echo "Version: $VER"
538+
echo "Package: $NAME@$VER"
533539
534540
- name: Check if version already published
535541
id: check

0 commit comments

Comments
 (0)