Skip to content

Commit e3220cc

Browse files
authored
ci: publish prompts with npm releases (#2707)
The release workflow builds `packages/prompts` but omits it from npm releases. Release preparation now sets its version to match `vite-plus`. The publish job uses the existing artifact and skips versions that already exist. It waits for npm availability before it creates the GitHub release.
1 parent dadf8c4 commit e3220cc

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

.github/workflows/prepare_release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
}
5555
update_json packages/cli/package.json
5656
update_json packages/core/package.json
57+
update_json packages/prompts/package.json
5758
update_toml packages/cli/binding/Cargo.toml
5859
update_toml crates/vp_global_cli/Cargo.toml
5960

.github/workflows/release.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ jobs:
112112
pattern: core
113113
merge-multiple: true
114114

115+
- name: Download prompts dist
116+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
117+
with:
118+
name: prompts
119+
path: packages/prompts/dist
120+
115121
- name: Download LICENSE files
116122
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
117123
with:
@@ -164,6 +170,13 @@ jobs:
164170
- name: Prepare and publish native addons
165171
run: node ./packages/cli/publish-native-addons.ts --mode npm
166172

173+
- name: Publish prompts
174+
run: >-
175+
node ./.github/scripts/publish-npm-package.ts
176+
"@voidzero-dev/vite-plus-prompts@${VERSION}"
177+
--
178+
pnpm publish --filter=./packages/prompts --tag latest --access public --no-git-checks
179+
167180
- name: Publish core dependency tier
168181
run: >-
169182
node ./.github/scripts/publish-npm-package.ts
@@ -186,8 +199,11 @@ jobs:
186199
pnpm publish --filter=./packages/cli --tag latest --access public --no-git-checks
187200
188201
# Downstream jobs build Docker images by installing this release from npm.
189-
- name: Wait for Vite+ to propagate
190-
run: node ./.github/scripts/wait-for-npm-packages.ts "vite-plus@${VERSION}"
202+
- name: Wait for published packages to propagate
203+
run: >-
204+
node ./.github/scripts/wait-for-npm-packages.ts
205+
"vite-plus@${VERSION}"
206+
"@voidzero-dev/vite-plus-prompts@${VERSION}"
191207
192208
- name: Create release body
193209
env:

0 commit comments

Comments
 (0)