Skip to content

Commit

Permalink
chore: update release workflow (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
wre232114 authored Feb 20, 2023
1 parent 15b4a51 commit 8a3e25a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ jobs:
id: changesets
uses: changesets/action@v1
with:
version: npx changeset version && pnpm i
publish: cd packages/cli && npm run build -- -b && cd ../../ && npx changeset publish
version: pnpm run bump
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
"scripts": {
"prepare": "husky install",
"test": "vitest run",
"start": "cd packages/cli && pnpm run start"
"start": "cd packages/cli && pnpm run start",
"build": "cd packages/cli && pnpm run build -b",
"release": "node scripts/release.mjs",
"bump": "node scripts/bump.mjs"
},
"lint-staged": {
"packages/**/*.ts": [
Expand Down
4 changes: 4 additions & 0 deletions scripts/bump.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { execSync } from "child_process";

execSync('npx changeset version', { stdio: 'inherit' });
execSync('pnpm install', { stdio: 'inherit' });
6 changes: 6 additions & 0 deletions scripts/release.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { execSync } from "child_process";

// build node packages
execSync("npm run build", { stdio: "inherit" });
// publish node packages
execSync("npx changeset publish", { stdio: "inherit" });

0 comments on commit 8a3e25a

Please sign in to comment.