Skip to content

Commit

Permalink
chore: using pkg.pr.new for pr release and improve setup script (#656)
Browse files Browse the repository at this point in the history
  • Loading branch information
XGHeaven authored Sep 25, 2024
1 parent 0ea3f24 commit 9bee03c
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: pnpm/action-setup@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pull Request Check
on: [pull_request]

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout Branch
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'

- name: Setup
run: pnpm run setup

- run: pnpx pkg-pr-new publish './packages/*' --template './examples/*'
10 changes: 3 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,17 @@ jobs:
name: Release
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18]

steps:
- name: Checkout Branch
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 18
cache: 'pnpm'

- name: Setup
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,17 @@ jobs:
name: Version
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18]

steps:
- name: Checkout Branch
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 18
cache: 'pnpm'

- name: Setup
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "The next generation of npm package development kit.",
"scripts": {
"preinstall": "npx only-allow pnpm",
"setup": "rm -rf node_modules && rm -rf ./packages/*/node_modules && pnpm i && pnpm run build",
"setup": "pnpm i && pnpm run build",
"build": "pnpm run clean && pnpm -r --filter=./packages/* run build",
"watch": "pnpm --parallel --filter=./packages/* run watch",
"clean": "rm -rf packages/*/lib",
Expand Down

0 comments on commit 9bee03c

Please sign in to comment.