From aba470cf922e03df5f4e45af6cce9b84643dcb15 Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Thu, 15 Feb 2024 20:11:24 +0300 Subject: [PATCH] npm: dont skip build step! --- .github/workflows/release.yml | 1 + typescript/npm/beforePublish.mjs | 1 + 2 files changed, 2 insertions(+) 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))