Skip to content

Commit b31cf2a

Browse files
committed
ci: pkg.pr.new action
1 parent 2f3c851 commit b31cf2a

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

.github/workflows/changesets.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,6 @@ jobs:
7272
env:
7373
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7474

75-
- name: Publish Prerelease
76-
if: steps.changesets.outputs.published != 'true'
77-
continue-on-error: true
78-
env:
79-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80-
run: |
81-
git reset --hard origin/main
82-
pnpm clean
83-
pnpm changeset version --no-git-tag --snapshot canary
84-
pnpm changeset:prepublish
85-
pnpm changeset publish --no-git-tag --snapshot canary --tag canary
86-
8775
jsr:
8876
name: JSR
8977
needs: verify

.github/workflows/prepublish.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Prepublish
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
14+
with:
15+
submodules: 'recursive'
16+
17+
- name: Install dependencies
18+
uses: ./.github/actions/install-dependencies
19+
20+
- name: Prepublish
21+
run: |
22+
cd src && pnpm version prerelease --preid $(git rev-parse --short=7 HEAD) && cd ..
23+
pnpm changeset:prepublish
24+
pnpx pkg-pr-new publish --pnpm --compact './src'

0 commit comments

Comments
 (0)