Skip to content

Commit 97ccf51

Browse files
committed
ci: add CLI PR preview workflow and pin pkg-pr-new
1 parent d036561 commit 97ccf51

3 files changed

Lines changed: 184 additions & 1 deletion

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: PR Preview (CLI)
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
paths:
7+
- "packages/cli/**"
8+
- "package.json"
9+
- "bun.lock"
10+
- ".github/workflows/pr-preview-cli.yml"
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
14+
cancel-in-progress: true
15+
16+
permissions:
17+
contents: read
18+
pull-requests: write
19+
20+
jobs:
21+
publish-cli-preview:
22+
name: Publish CLI preview package
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 10
25+
steps:
26+
- uses: actions/checkout@v6
27+
28+
- uses: actions/setup-node@v6
29+
with:
30+
node-version: "24"
31+
32+
- uses: oven-sh/setup-bun@v2
33+
with:
34+
bun-version-file: package.json
35+
36+
- name: Install dependencies
37+
run: bun install --frozen-lockfile
38+
39+
- name: Build CLI package
40+
run: bun run build
41+
working-directory: packages/cli
42+
43+
# Use repo-locked pkg-pr-new from devDependencies.
44+
- name: Publish PR preview package
45+
run: bunx --bun --no-install pkg-pr-new publish --bun --bin --packageManager=npm,pnpm,bun ./packages/cli
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)