File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish (JSR)
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ release :
6
+ types : [published]
7
+
8
+ concurrency : ${{ github.workflow }}-${{ github.ref }}
9
+
10
+ jobs :
11
+ publish :
12
+ permissions :
13
+ contents : read
14
+ id-token : write
15
+ name : Publish to JSR
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+ - name : Publish
20
+ run : npx jsr publish --provenance --allow-slow-types
Original file line number Diff line number Diff line change 37
37
createGithubReleases : true
38
38
env :
39
39
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40
+
41
+ - name : Update version for deno/jsr
42
+ if : steps.changesets.outputs.hasChangesets == 'false'
43
+ run : node sync_versions.mjs
Original file line number Diff line number Diff line change
1
+ import { readFileSync , writeFileSync } from "node:fs" ;
2
+
3
+ const pkgBuff = readFileSync ( "./package.json" ) ;
4
+ const pkg = JSON . parse ( pkgBuff ) ;
5
+
6
+ const jsrBuff = readFileSync ( "./deno.jsonc" ) ;
7
+ const jsrCurr = JSON . parse ( jsrBuff ) ;
8
+
9
+ if ( jsrCurr . version !== pkg . version ) {
10
+ console . log ( "Updating deno version" ) ;
11
+ jsrCurr . version = pkg . version ;
12
+
13
+ writeFileSync ( "./deno.jsonc" , JSON . stringify ( jsrCurr ) ) ;
14
+ } else {
15
+ console . log ( "deno version already up to date" ) ;
16
+ }
You can’t perform that action at this time.
0 commit comments