Skip to content

Commit cfaa1ae

Browse files
committed
feat: testing trusted publisher npm
1 parent fc7936f commit cfaa1ae

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ jobs:
1818
- name: Set up Node.js
1919
uses: actions/setup-node@v4
2020
with:
21-
node-version: 22.12.0
22-
registry-url: https://registry.npmjs.org/
21+
node-version: 24
2322
cache: "npm"
2423
cache-dependency-path: package-lock.json
2524

@@ -44,7 +43,7 @@ jobs:
4443
- name: Set up Node.js
4544
uses: actions/setup-node@v4
4645
with:
47-
node-version: 22.12.0
46+
node-version: 24
4847
cache: "npm"
4948
cache-dependency-path: package-lock.json
5049

@@ -69,6 +68,12 @@ jobs:
6968
echo "workflow_ref=$GITHUB_WORKFLOW_REF"
7069
echo "oidc_url_set=${ACTIONS_ID_TOKEN_REQUEST_URL:+yes}"
7170
71+
- name: Prepare npm for OIDC trusted publish
72+
run: |
73+
npm config set registry https://registry.npmjs.org/
74+
npm config delete //registry.npmjs.org/:_authToken || true
75+
npm config list
76+
7277
- name: Publish to npm
7378
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
7479
run: npm publish --access public --provenance

0 commit comments

Comments
 (0)