Skip to content

Commit

Permalink
fix: get more accurate npm version
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous committed Dec 23, 2024
1 parent 52d2006 commit ae32803
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/nodejs-test-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ jobs:
;;
*)
npm_version=latest
echo "latest=true" >> "${GITHUB_OUTPUT}"
;;
esac
npm_version=$(npm view "npm@${npm_version}" version)
echo "version=${npm_version}" >> "${GITHUB_OUTPUT}"
- name: Update npm to ${{ steps.npm-version.outputs.version }}
- name: Update npm to ${{ steps.npm-version.outputs.version }}${{ steps.npm-version.outputs.latest && ' (latest)' }}
shell: bash
env:
npm_version: ${{ steps.npm-version.outputs.version }}
Expand Down

0 comments on commit ae32803

Please sign in to comment.