Skip to content

Commit c90c344

Browse files
authored
[OGUI-1860] Migrate to use trusted publisher for npm deployments (#2051)
* updates the `release.yml` to make use of the NPM trusted publishers functionality between NPM and GitHub so that access tokens do not have to be generated, maintained and provided. * migrates to use to Node v24 (release only) to force NPM v11 to be used * More on trusted publishers: https://docs.npmjs.com/trusted-publishers
1 parent 4d0e2a0 commit c90c344

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
name: release
2-
permissions:
3-
contents: write
4-
packages: write
5-
actions: write
62
on:
73
release:
84
types: [created]
95
workflow_dispatch:
6+
7+
permissions:
8+
contents: write
9+
id-token: write
10+
1011
jobs:
1112
deploy-npm-module:
1213
runs-on: ubuntu-latest
@@ -16,7 +17,7 @@ jobs:
1617
- uses: actions/checkout@v6
1718
- uses: actions/setup-node@v6
1819
with:
19-
node-version: '22.x'
20+
node-version: '24.x'
2021
registry-url: 'https://registry.npmjs.org'
2122
- name: Check released tag matches ALICE O2 naming pattern
2223
run: |
@@ -35,8 +36,6 @@ jobs:
3536
echo "version=$VERSION" >> $GITHUB_OUTPUT
3637
echo "PROJECT=$PROJECT" >> $GITHUB_ENV
3738
- run: npm publish
38-
env:
39-
NODE_AUTH_TOKEN: ${{ secrets.NPM_DEPLOY_TOKEN }}
4039
upload-asset:
4140
runs-on: ubuntu-latest
4241
needs: deploy-npm-module

0 commit comments

Comments
 (0)