Skip to content

Commit 4c27810

Browse files
committed
ci: Add npm scope and move up pnpm setup in publish workflow
Authentication via OIDC for NPM's trusted publishing may need to explicitly define scope if it doesn't match the repository owner. This is the case here because the repository owner is eclipsesource. Move pnpm setup before node setup to avoid pnpm overriding .npmrc changes done by node setup for trusted publishing
1 parent 7ecd829 commit 4c27810

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/publish.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,19 @@ jobs:
3636
git config user.name "jsonforms-publish[bot]"
3737
git config user.email "[email protected]"
3838
39-
- name: 'Setup node'
40-
uses: 'actions/setup-node@v4'
41-
with:
42-
node-version: '22'
43-
registry-url: 'https://registry.npmjs.org'
44-
4539
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
4640
name: Install pnpm
4741
id: pnpm-install
4842
with:
4943
run_install: false
5044

45+
- name: 'Setup node'
46+
uses: 'actions/setup-node@v4'
47+
with:
48+
node-version: '22'
49+
registry-url: 'https://registry.npmjs.org'
50+
scope: '@jsonforms' # ensure OIDC token is tied to the scope
51+
5152
- name: 'Install Packages'
5253
run: 'pnpm i --frozen-lockfile'
5354

0 commit comments

Comments
 (0)