Skip to content

Commit

Permalink
ci: improve new version check for release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl committed Feb 28, 2025
1 parent c17be8e commit b4452b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
${{ inputs.os }}-${{ inputs.node }}-release
- id: version_check
name: Verify new version 🔍
name: Identify new version 🔍
run: |
PKG_VERSION=$(node -p "require('./package.json').version")
PKG_NAME=$(node -p "require('./package.json').name")
PUBLISHED_VERSION=$(npm view $PKG_NAME version 2>/dev/null || echo "0.0.0")
PUBLISHED_VERSION=$(npm view $PKG_NAME@next version 2>/dev/null || npm view $PKG_NAME version 2>/dev/null || echo "0.0.0")
echo "version=$PKG_VERSION" >> $GITHUB_OUTPUT
if [ "$PKG_VERSION" = "$PUBLISHED_VERSION" ]; then
echo "is_new_version=false" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit b4452b4

Please sign in to comment.