diff --git a/.github/workflows/publish-on-tag.yml b/.github/workflows/publish-on-tag.yml index fc953565..65a0d1ad 100644 --- a/.github/workflows/publish-on-tag.yml +++ b/.github/workflows/publish-on-tag.yml @@ -25,7 +25,7 @@ jobs: npm publish DEPRECATED_RANGE=$(node utils/get_deprecated_version_range.js) echo "Deprecating old puppeteer versions: $DEPRECATED_RANGE" - npm deprecate puppeteer@\"$DEPRECATED_RANGE\" "Version no longer supported. Upgrade to @latest" + npm deprecate puppeteer@$DEPRECATED_RANGE "Version no longer supported. Upgrade to @latest" - name: Publish puppeteer-core env: NPM_TOKEN: ${{secrets.NPM_TOKEN_PUPPETEER_CORE}} diff --git a/utils/get_deprecated_version_range.js b/utils/get_deprecated_version_range.js index a0603c3d..280bbf8a 100644 --- a/utils/get_deprecated_version_range.js +++ b/utils/get_deprecated_version_range.js @@ -18,10 +18,13 @@ const { versionsPerRelease, lastMaintainedChromiumVersion, } = require('../versions.js'); -const version = versionsPerRelease.get(lastMaintainedChromiumVersion); +let version = versionsPerRelease.get(lastMaintainedChromiumVersion); if (version.toLowerCase() === 'next') { console.error('Unexpected NEXT Puppeteer version in versions.js'); process.exit(1); } -console.log('< ' + version); +if (version.startsWith('v')) { + version = version.substring(1); +} +console.log('<' + version); process.exit(0);