Skip to content

Commit e85a01d

Browse files
authored
chore: update NPM publishing (#465)
fixes #464 Signed-off-by: Ry Jones <[email protected]>
1 parent 491b56f commit e85a01d

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/release.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- "v[0-9]+.[0-9]+.[0-9]+"
1010
- "v[0-9]+.[0-9]+.[0-9]+-*"
1111

12+
permissions:
13+
contents: read
14+
1215
env:
1316
IMAGE_NAME: ${{ github.repository_owner }}/fabric-nodeenv
1417

@@ -19,22 +22,27 @@ jobs:
1922
publishnpm:
2023
runs-on: ubuntu-24.04
2124
needs: test
25+
permissions:
26+
contents: read
27+
id-token: write
2228
steps:
2329
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2430
with:
25-
node-version: "18.x"
31+
node-version: "lts/*"
2632
registry-url: "https://registry.npmjs.org"
33+
# Ensure npm 11.5.1 or later for trusted publishing support
34+
- name: Update npm
35+
run: npm install -g npm@latest
2736
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
2837
with:
2938
name: node-tgzs
3039
path: build/
31-
- run: |
40+
- name: Publish packages with provenance (OIDC)
41+
run: |
3242
set -xev
3343
ls -lart build/
3444
cd build
3545
find . -type f -name 'fabric-*.tgz' -exec npm publish {} \;
36-
env:
37-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3846
3947
docker-build-push:
4048
name: Push Docker image

0 commit comments

Comments
 (0)