Skip to content

Commit 58a7b73

Browse files
committed
make pkg pr flow for PRs
1 parent e8a9e31 commit 58a7b73

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: pkg.pr preview release
2+
3+
on:
4+
pull_request:
5+
# Run the workflow when labels are added to a PR or when the PR is updated.
6+
types:
7+
- opened
8+
- synchronize
9+
- labeled
10+
- reopened
11+
12+
permissions:
13+
# Allow the workflow to add comments to pull requests when publishing.
14+
pull-requests: write
15+
16+
jobs:
17+
Pkg-pr-new:
18+
# Only run this job when the pull request contains the pkg‑pr‑release label.
19+
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'pkg-pr-release')
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Restore repository
24+
uses: actions/cache@v4
25+
with:
26+
path: .
27+
key: repo-${{ github.sha }}
28+
- name: Setup Node.JS 20
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
- name: build
33+
uses: ./.github/actions/build
34+
- name: Build o1js and mina-signer
35+
run: |
36+
npm run prepublish:full
37+
cd src/mina-signer
38+
npm ci
39+
npm run prepublish:full
40+
- name: Publish o1js and mina-signer on pkg-pr-new
41+
run: npx pkg-pr-new publish ./ ./src/mina-signer # Enable `--compact` once published to NPM with `repository` in package.json

0 commit comments

Comments
 (0)