Skip to content

Commit

Permalink
feat(ci): add pkg-pr for branch refactor/node
Browse files Browse the repository at this point in the history
  • Loading branch information
RSS1102 committed Oct 3, 2024
1 parent b6c08dc commit 7971647
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/pkg-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 'pkg-pr'
on:
push:
branches:
- 'refactor/node'
tags:
- '!**'
pull_request:
branches:
- 'refactor/node'
pull_request_review:
types: [submitted]


jobs:
continuous-release:
if: github.repository == 'farm-fe/farm' && github.event.review.state == 'APPROVED'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- name: Install deps
run: pnpm install

- name: Build
run: pnpm build --withTypes

- name: Release
run: pnpx pkg-pr-new publish --compact --pnpm './packages/cli' './packages/core'
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"bump": "node scripts/bump.mjs",
"bump:create-farm": "node scripts/bump-create-farm-version.mjs",
"test:rs:update": "cross-env FARM_UPDATE_SNAPSHOTS=1 cargo test -p farmfe_compiler",
"pkg:pr": "node scripts/pkg-pr.mjs",
"ready": "node scripts/ready.mjs",
"test-e2e": "vitest run -c vitest.config.e2e.ts",
"prepare": "husky",
Expand Down
5 changes: 5 additions & 0 deletions scripts/pkg-pr.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { buildCli, buildCoreCjs, runTaskQueue } from './build.mjs';

await runTaskQueue();
await buildCli();
await buildCoreCjs();

0 comments on commit 7971647

Please sign in to comment.