Skip to content

Commit 0cf9e0b

Browse files
authored
Setup trusted publishing to NPM (#5802)
1 parent df61f10 commit 0cf9e0b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/actions/setup/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ inputs:
55
description: The version of Node.js to install
66
required: true
77
default: 23.7.0
8+
registry-url:
9+
description: Optional registry to set up for auth.
810

911
runs:
1012
using: composite
@@ -16,6 +18,7 @@ runs:
1618
with:
1719
cache: pnpm
1820
node-version: ${{ inputs.node-version }}
21+
registry-url: ${{ inputs.registry-url }}
1922
- name: Install dependencies
2023
shell: bash
2124
run: pnpm install

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ jobs:
2222
- uses: actions/checkout@v4
2323
- name: Install dependencies
2424
uses: ./.github/actions/setup
25+
with:
26+
registry-url: "https://registry.npmjs.org"
27+
- name: Upgrade npm for OIDC support
28+
run: npm install -g npm@latest
2529
- name: Create Release Pull Request or Publish
2630
uses: changesets/action@v1
2731
with:
2832
version: pnpm changeset-version
2933
publish: pnpm changeset-publish
3034
env:
3135
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)