From 00404a07515c37dc0e2fbc7d9aa99d72fab224ec Mon Sep 17 00:00:00 2001 From: JinmingYang <2214962083@qq.com> Date: Fri, 26 Jul 2024 20:00:07 +0800 Subject: [PATCH] ci: add publish to open-vsx.org --- .github/workflows/build.yml | 3 --- scripts/publish.ts | 13 +++++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21bf804..8b143f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,9 +35,6 @@ jobs: - name: Test run: pnpm run test - - name: Build - run: pnpm run build:minify - - name: Publish run: pnpm run publish env: diff --git a/scripts/publish.ts b/scripts/publish.ts index b86cd42..e97fb5b 100644 --- a/scripts/publish.ts +++ b/scripts/publish.ts @@ -34,12 +34,13 @@ const publish = async () => { ], { cwd: root, stdio: 'inherit' } ) - // console.log('\nPublish to OVSE...\n') - // await execa( - // 'npx', - // ['ovsx', 'publish', '--no-dependencies', '-p', process.env.OVSX_TOKEN!], - // { cwd: root, stdio: 'inherit' } - // ) + + console.log('\nPublish to OVSE...\n') + await execa( + 'npx', + ['ovsx', 'publish', '--no-dependencies', '-p', process.env.OVSX_TOKEN!], + { cwd: root, stdio: 'inherit' } + ) } finally { await fs.writeFile(pkgPath, rawJSON, 'utf-8') }