Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): add pkg-pr for branch refactor/node #1801

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/pkg-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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: Cache rust artifacts
uses: oxidecomputer/actions-rs_toolchain@oxide/master

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

RSS1102 marked this conversation as resolved.
Show resolved Hide resolved
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- name: Install deps
run: pnpm install

- name: Build
run: pnpm run pkg:pr

- 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();
Loading