diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 554b522..4418d56 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,12 +25,12 @@ 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' "$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 - echo "Current version is greater than npm version." + if [ "$(printf '%s\n' "$NPM_VERSION" "$CURRENT_VERSION" | sort -V | tail -n1)" != "$NPM_VERSION" ] || [ "$NPM_VERSION" == "0.0.0" ]; then + echo "Current version is greater than npm version, or package has not been published to npm yet." echo "version_changed=true" >> $GITHUB_ENV + else + echo "Current version is less than or equal to npm version." + echo "version_changed=false" >> $GITHUB_ENV fi - name: Install dependencies