Skip to content

Commit a3c6110

Browse files
committed
ci(release-please): Enable trusted publishing
Using trusted publishing via OIDC for npm publishing. This makes the use of npm tokens obsolete and improves security. See: https://docs.npmjs.com/trusted-publishers JIRA: CPOUI5FOUNDATION-1127
1 parent 3b115ae commit a3c6110

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/release-please.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,18 @@ jobs:
3434
if: ${{needs.pull-request.outputs.releases_created && toJson(fromJson(needs.pull-request.outputs.paths_released)) != '[]'}}
3535
runs-on: ubuntu-24.04
3636
permissions:
37-
id-token: write
37+
id-token: write # Required for trusted publishing via OIDC (https://docs.npmjs.com/trusted-publishers)
3838
strategy:
3939
matrix:
4040
path_released: ${{fromJson(needs.pull-request.outputs.paths_released)}}
4141
steps:
4242
- name: Checkout
4343
uses: actions/checkout@v4
44-
- name: Use Node.js LTS 22.x
45-
uses: actions/setup-node@v4
44+
- name: Node.js LTS
45+
uses: actions/setup-node@v5
4646
with:
47-
node-version: 22.x
48-
- name: Publish to NPM
49-
env:
50-
NPM_TOKEN: ${{secrets.NPM_UI5BOT}}
47+
node-version: 24.x
48+
- name: Publish to npm
5149
run: |
5250
cd ${{matrix.path_released}}
53-
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> ./.npmrc
54-
npm publish --provenance --workspaces false --access public
51+
npm publish --workspaces false --access public

0 commit comments

Comments
 (0)