File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Publish to npm on GitHub Release
1+ name : Publish
22
33on :
44 release :
1212 publish :
1313 runs-on : ubuntu-latest
1414 steps :
15- - name : Checkout
16- uses : actions/checkout@v4
15+ - uses : actions/checkout@v6
1716
1817 - name : Setup Node
1918 uses : actions/setup-node@v4
@@ -22,19 +21,28 @@ jobs:
2221 registry-url : https://registry.npmjs.org
2322 cache : npm
2423
25- - name : Ensure release tag matches package.json version
24+ - name : Ensure versions match
2625 shell : bash
2726 run : |
2827 set -euo pipefail
2928 PKG_VERSION="$(node -p "require('./package.json').version")"
29+ JSR_VERSION="$(node -p "require('./jsr.json').version")"
3030 TAG_NAME="${{ github.event.release.tag_name }}"
31+ if [[ "$PKG_VERSION" != "$JSR_VERSION" ]]; then
32+ echo "Version mismatch: package.json=$PKG_VERSION, jsr.json=$JSR_VERSION"
33+ exit 1
34+ fi
3135 if [[ "$TAG_NAME" != "v$PKG_VERSION" && "$TAG_NAME" != "$PKG_VERSION" ]]; then
32- echo "Release tag '$TAG_NAME' does not match package.json version '$PKG_VERSION' (expected '$PKG_VERSION' or 'v$PKG_VERSION')."
36+ echo "Release tag '$TAG_NAME' does not match version '$PKG_VERSION' (expected '$PKG_VERSION' or 'v$PKG_VERSION')."
3337 exit 1
3438 fi
3539
3640 - name : Install dependencies
3741 run : npm install --ignore-scripts
3842
39- - name : Publish
43+ - name : Publish to npm
4044 run : npm publish --access public --provenance
45+
46+ - name : Publish to JSR
47+ run : npx jsr publish
48+
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @proxymesh/javascript-proxy-headers" ,
3+ "version" : " 0.1.0" ,
4+ "license" : " MIT" ,
5+ "exports" : " ./mod.ts"
6+ }
7+
Original file line number Diff line number Diff line change 1+ // JSR entrypoint: re-export the public API from the JS module.
2+ export * from "./index.js" ;
3+
You can’t perform that action at this time.
0 commit comments