Skip to content

Commit

Permalink
🐎 ci(workflow): 版本判断逻辑修改
Browse files Browse the repository at this point in the history
  • Loading branch information
marherb committed May 4, 2024
1 parent 83ccd79 commit 128d3ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
PACKAGE_NAME=$(node -p "require('./package.json').name")
CURRENT_VERSION=$(node -p "require('./package.json').version")
NPM_VERSION=$(npm view $PACKAGE_NAME version || echo "0.0.0")
if [ "$(printf '%s\n' "$CURRENT_VERSION" "$NPM_VERSION" | sort -V | tail -n1)" != "$CURRENT_VERSION" ] || [ "$NPM_VERSION" == "0.0.0" ]; then
if [ "$(printf '%s\n' "$NPM_VERSION" "$CURRENT_VERSION" | sort -V | tail -n1)" != "$CURRENT_VERSION" ] || [ "$NPM_VERSION" == "0.0.0" ]; then
echo "Current version is less than or equal to npm version, or package has not been published to npm yet."
echo "version_changed=false" >> $GITHUB_ENV
else
Expand Down

0 comments on commit 128d3ac

Please sign in to comment.