88 type : boolean
99 required : false
1010 default : ' false'
11+ env :
12+ JAVA_VERSION : 21
13+ NODE_VERSION : 22
1114
1215jobs :
1316 build :
@@ -40,19 +43,22 @@ jobs:
4043 publish : false
4144
4245 runs-on : ${{ matrix.os }}
46+ permissions :
47+ contents : read
48+ id-token : write
4349
4450 steps :
4551 - name : Checkout
4652 uses : actions/checkout@v6
4753 - name : Setup Node.js environment
4854 uses : actions/setup-node@v6
4955 with :
50- node-version : 22 .x
56+ node-version : ${{env.NODE_VERSION}} .x
5157 - name : Setup Java JDK
5258 uses : actions/setup-java@v5
5359 with :
5460 distribution : ' temurin'
55- java-version : ' 17 '
61+ java-version : ${{env.JAVA_VERSION}}
5662 - name : Add rust target
5763 run : rustup target add ${{ matrix.target }}
5864 - name : Setup cross-compilation
@@ -79,36 +85,35 @@ jobs:
7985 run : mv java.*.node npm/${{ matrix.package }}
8086 shell : bash
8187 - name : NPM Publish Binary
82- uses : JS-DevTools/npm-publish@e06fe3ef65499b38eb12224f2a60979f6d797330
88+ uses : JS-DevTools/npm-publish@v4
8389 if : ${{ matrix.package != 'linux-x64-gnu' }}
8490 with :
8591 access : public
86- token : ${{ secrets.NPM_TOKEN }}
8792 package : npm/${{ matrix.package }}/package.json
8893 dry-run : ${{ github.event.inputs.dry-run == 'true' }}
8994 ignore-scripts : false
9095 - name : NPM Publish
91- uses : JS-DevTools/npm-publish@v3 .1.1
96+ uses : JS-DevTools/npm-publish@v4 .1.5
9297 if : ${{ matrix.package == 'linux-x64-gnu' }}
9398 with :
9499 access : public
95- token : ${{ secrets.NPM_TOKEN }}
96100 dry-run : ${{ github.event.inputs.dry-run == 'true' }}
97101 ignore-scripts : false
98102
99103 build-musl :
100104 runs-on : ubuntu-latest
105+ permissions :
106+ contents : read
107+ id-token : write
101108 steps :
102109 - uses : actions/checkout@v6
103110 - name : Build
104111 uses : addnab/docker-run-action@v3
105112 timeout-minutes : 180
106113 with :
107- image : ghcr.io/markusjx/node-java-bridge/java-bridge-node- alpine-build:node-20-jdk-17
114+ image : ghcr.io/markusjx/node-java-bridge/test- alpine:${{env.NODE_VERSION}}-${{env.JAVA_VERSION}}
108115 options : -v ${{ github.workspace }}:/github/workspace -w /github/workspace
109116 run : |
110- npm config set cache /tmp --global
111- export CI=true
112117 npm ci
113118 npm run build
114119 - name : Get version
@@ -122,10 +127,9 @@ jobs:
122127 run : mv java.*.node npm/linux-x64-musl
123128 shell : bash
124129 - name : NPM Publish Binary
125- uses : JS-DevTools/npm-publish@v3.1.1
130+ uses : JS-DevTools/npm-publish@v4
126131 with :
127132 access : public
128- token : ${{ secrets.NPM_TOKEN }}
129133 package : npm/linux-x64-musl/package.json
130134 dry-run : ${{ github.event.inputs.dry-run == 'true' }}
131135 ignore-scripts : false
@@ -143,13 +147,12 @@ jobs:
143147 shell : bash
144148 - name : Create Release
145149 id : create_release
146- uses : actions/create- release@v1
150+ uses : softprops/action-gh- release@v2
147151 env :
148152 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
149153 with :
150154 tag_name : v${{ env.version }}
151- release_name : Release v${{ env.version }}
152- body : |
153- Auto-generated release
155+ name : Release v${{ env.version }}
156+ generate_release_notes : true
154157 draft : true
155158 prerelease : false
0 commit comments