From 64710bc409aebecd8d497a21da5e9d1b53f739da Mon Sep 17 00:00:00 2001 From: MK Date: Tue, 15 Sep 2026 11:01:17 +0800 Subject: [PATCH 1/2] ci: publish prompts with npm releases --- .github/workflows/prepare_release.yml | 1 + .github/workflows/release.yml | 22 ++++++++++++++++++++-- CONTRIBUTING.md | 2 ++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prepare_release.yml b/.github/workflows/prepare_release.yml index b900a139a8..f8dd28923b 100644 --- a/.github/workflows/prepare_release.yml +++ b/.github/workflows/prepare_release.yml @@ -54,6 +54,7 @@ jobs: } update_json packages/cli/package.json update_json packages/core/package.json + update_json packages/prompts/package.json update_toml packages/cli/binding/Cargo.toml update_toml crates/vp_global_cli/Cargo.toml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2f1121218a..a153b4533e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,6 +112,12 @@ jobs: pattern: core merge-multiple: true + - name: Download prompts dist + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: prompts + path: packages/prompts/dist + - name: Download LICENSE files uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: @@ -164,6 +170,13 @@ jobs: - name: Prepare and publish native addons run: node ./packages/cli/publish-native-addons.ts --mode npm + - name: Publish prompts + run: >- + node ./.github/scripts/publish-npm-package.ts + "@voidzero-dev/vite-plus-prompts@${VERSION}" + -- + pnpm publish --filter=./packages/prompts --tag latest --access public --no-git-checks + - name: Publish core dependency tier run: >- node ./.github/scripts/publish-npm-package.ts @@ -186,8 +199,11 @@ jobs: pnpm publish --filter=./packages/cli --tag latest --access public --no-git-checks # Downstream jobs build Docker images by installing this release from npm. - - name: Wait for Vite+ to propagate - run: node ./.github/scripts/wait-for-npm-packages.ts "vite-plus@${VERSION}" + - name: Wait for published packages to propagate + run: >- + node ./.github/scripts/wait-for-npm-packages.ts + "vite-plus@${VERSION}" + "@voidzero-dev/vite-plus-prompts@${VERSION}" - name: Create release body env: @@ -202,6 +218,7 @@ jobs: ### Published Packages - \`@voidzero-dev/vite-plus-core@${VERSION}\` + - \`@voidzero-dev/vite-plus-prompts@${VERSION}\` - \`vite-plus@${VERSION}\` ### Installation @@ -357,6 +374,7 @@ jobs: **Published Packages:** • @voidzero-dev/vite-plus-core@${{ env.VERSION }} + • @voidzero-dev/vite-plus-prompts@${{ env.VERSION }} • vite-plus@${{ env.VERSION }} **Docker (GHCR):** diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9a2f66a24e..0c8fdf69c3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -200,6 +200,8 @@ git push --force-with-lease The [release workflow](.github/workflows/release.yml) publishes packages in dependency order: platform packages → `@voidzero-dev/vite-plus-core` → `vite-plus`. After each tier, it waits up to 10 minutes for the exact versions and their tarballs to become available. It then waits another 60 seconds for CDN propagation. +The workflow also publishes `@voidzero-dev/vite-plus-prompts` with the same release version. It waits for that package to become available before it creates the GitHub release. Configure the package's [npm trusted publisher](https://docs.npmjs.com/trusted-publishers/) to allow publishing from `voidzero-dev/vite-plus`, workflow `release.yml`, and environment `release`. + A propagation timeout fails the release job and stops subsequent steps. This does not mean npm rejected the upload; npm may have accepted it and still be scanning the packages. Once the packages become available, open the failed workflow run in GitHub Actions and select **Re-run failed jobs**. The workflow skips versions that npm has published and checks availability again before continuing. Keep the same version. From 005b1dc518b0c59f9474b09df063cb2e3092fc84 Mon Sep 17 00:00:00 2001 From: MK Date: Tue, 15 Sep 2026 14:57:12 +0800 Subject: [PATCH 2/2] ci: limit prompts release changes to publishing --- .github/workflows/release.yml | 2 -- CONTRIBUTING.md | 2 -- 2 files changed, 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a153b4533e..7a77bcfd00 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -218,7 +218,6 @@ jobs: ### Published Packages - \`@voidzero-dev/vite-plus-core@${VERSION}\` - - \`@voidzero-dev/vite-plus-prompts@${VERSION}\` - \`vite-plus@${VERSION}\` ### Installation @@ -374,7 +373,6 @@ jobs: **Published Packages:** • @voidzero-dev/vite-plus-core@${{ env.VERSION }} - • @voidzero-dev/vite-plus-prompts@${{ env.VERSION }} • vite-plus@${{ env.VERSION }} **Docker (GHCR):** diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0c8fdf69c3..9a2f66a24e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -200,8 +200,6 @@ git push --force-with-lease The [release workflow](.github/workflows/release.yml) publishes packages in dependency order: platform packages → `@voidzero-dev/vite-plus-core` → `vite-plus`. After each tier, it waits up to 10 minutes for the exact versions and their tarballs to become available. It then waits another 60 seconds for CDN propagation. -The workflow also publishes `@voidzero-dev/vite-plus-prompts` with the same release version. It waits for that package to become available before it creates the GitHub release. Configure the package's [npm trusted publisher](https://docs.npmjs.com/trusted-publishers/) to allow publishing from `voidzero-dev/vite-plus`, workflow `release.yml`, and environment `release`. - A propagation timeout fails the release job and stops subsequent steps. This does not mean npm rejected the upload; npm may have accepted it and still be scanning the packages. Once the packages become available, open the failed workflow run in GitHub Actions and select **Re-run failed jobs**. The workflow skips versions that npm has published and checks availability again before continuing. Keep the same version.