ci: fix tag version

This commit is contained in:
Alex Yang 2023-06-29 00:26:48 +08:00
parent 887434fea4
commit 2250f42d2a

View File

@ -51,7 +51,7 @@ jobs:
id: get-canary-version id: get-canary-version
if: ${{ github.ref_type == 'tag' }} if: ${{ github.ref_type == 'tag' }}
run: | run: |
TAG_VERSION=${GITHUB_REF#refs/tags/} TAG_VERSION=${GITHUB_REF#refs/tags/v}
PACKAGE_VERSION=$(node -p "require('./package.json').version") PACKAGE_VERSION=$(node -p "require('./package.json').version")
if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
echo "Tag version ($TAG_VERSION) does not match package.json version ($PACKAGE_VERSION)" echo "Tag version ($TAG_VERSION) does not match package.json version ($PACKAGE_VERSION)"