diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 79788fd..51ff7d3 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -26,7 +26,7 @@ jobs: registry-url: 'https://registry.npmjs.org' - name: Verify tag matches package.json version - run: node -e "const {version}=require('./package.json'); const tag=process.env.GITHUB_REF_NAME; if(version!==tag){console.error(\`Tag \${tag} does not match package.json version \${version}\`); process.exit(1);}" + run: node -e "const {version}=require('./package.json'); const tag=process.env.GITHUB_REF_NAME.replace(/^v/,''); if(version!==tag){console.error(\`Tag \${tag} does not match package.json version \${version}\`); process.exit(1);}" - name: Upgrade npm run: npm install -g npm@latest