diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf37316..6223eca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,7 @@ jobs: run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + - run: pnpm build-plugin:npm - run: node typescript/npm/beforePublish.mjs - run: pnpm publish --access public --no-git-checks working-directory: typescript diff --git a/typescript/npm/beforePublish.mjs b/typescript/npm/beforePublish.mjs index ce400d5..0568da5 100644 --- a/typescript/npm/beforePublish.mjs +++ b/typescript/npm/beforePublish.mjs @@ -4,4 +4,5 @@ fs.copyFileSync('./typescript/npm/package.json', './typescript/package.json') const packageJson = JSON.parse(fs.readFileSync('./typescript/package.json', 'utf8')) packageJson.version = JSON.parse(fs.readFileSync('./package.json', 'utf8')).version +if (packageJson.version === '0.0.0-dev') packageJson.version = '0.0.0' fs.writeFileSync('./typescript/package.json', JSON.stringify(packageJson, null, 2))