Skip to content

Commit 20e3d3f

Browse files
authored
ci: configure manual JSR publish flow (#1179)
1 parent 713016c commit 20e3d3f

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/jsr-publish.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: JSR Manual Publish
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions: {}
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
persist-credentials: false
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 22
18+
cache: 'npm'
19+
- run: npm ci
20+
- run: npm test
21+
env:
22+
FORCE_COLOR: 3
23+
- run: node scripts/build-jsr.mjs
24+
- uses: actions/upload-artifact@v4
25+
with:
26+
name: build-${{ github.run_id }}
27+
path: |
28+
build
29+
jsr.json
30+
retention-days: 1
31+
32+
jsr-publish:
33+
needs: build
34+
runs-on: ubuntu-latest
35+
permissions:
36+
contents: read
37+
id-token: write
38+
steps:
39+
- uses: actions/checkout@v4
40+
with:
41+
persist-credentials: false
42+
- uses: actions/setup-node@v4
43+
with:
44+
node-version: 22
45+
cache: 'npm'
46+
- uses: actions/download-artifact@v4
47+
with:
48+
name: build-${{ github.run_id }}
49+
50+
- name: pushing to jsr.io
51+
run: npx jsr publish --allow-dirty

0 commit comments

Comments
 (0)