Skip to content

Commit

Permalink
chore(scripts): update release process to use prepack script
Browse files Browse the repository at this point in the history
Refactor the release script in `package.json` to replace `postinstall`
with `prepack`, ensuring that build steps are completed before packing.

Add a new step in the GitHub Actions workflow to run the `prepack`
script after installing dependencies, enhancing the build process.
  • Loading branch information
s00d committed Jan 20, 2025
1 parent 51df7fd commit 3145219
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Prepack
run: |
pnpm --filter "./packages/**" run build
pnpm run prepack
# run build script
- name: Build VitePress site
run: pnpm run docs:build
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
"internals.d.ts"
],
"scripts": {
"postinstall": "pnpm --filter \"./packages/**\" run build && nuxt-module-build build --stub && nuxt-module-build prepare && nuxt-module-build build && pnpm run client:build",
"prepack": "pnpm --filter \"./packages/**\" run build && nuxt-module-build build --stub && nuxt-module-build prepare && nuxt-module-build build && pnpm run client:build",
"dev": "nuxi dev playground",
"dev:build": "nuxi build playground",
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
"dev:generate": "nuxi generate playground",
"release": "pnpm run lint && pnpm run typecheck && pnpm run test:types && pnpm run test && pnpm run test:workspaces && pnpm run postinstall && changelogen --release && pnpm publish -r && git push --follow-tags",
"release": "pnpm run lint && pnpm run typecheck && pnpm run test:types && pnpm run test && pnpm run test:workspaces && pnpm run prepack && changelogen --release && pnpm publish -r && git push --follow-tags",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "playwright test",
Expand Down

0 comments on commit 3145219

Please sign in to comment.