Skip to content

Commit a1a8791

Browse files
authored
feat: support npm OIDC for js packages publishing (#3626)
1 parent ad82161 commit a1a8791

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/cd-packages.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Publish packages
22

33
permissions:
4+
id-token: write # required for OIDC on npm
45
contents: write # needed to push tags
56

67
on:
@@ -24,6 +25,10 @@ jobs:
2425
with:
2526
node-version-file: .nvmrc
2627
cache: yarn
28+
registry-url: "https://registry.npmjs.org"
29+
# Ensure npm 11.5.1 or later is installed to support OIDC
30+
- name: Update npm
31+
run: npm install -g npm@latest
2732
- name: Install dependencies
2833
run: yarn install --immutable
2934
# If there is no new version for dependency package (e.g. core)
@@ -37,7 +42,6 @@ jobs:
3742
run: yarn workspaces foreach --all --no-private -pt npm publish --tolerate-republish --json | tee publish.log
3843
env:
3944
SKIP_PREPACK: true
40-
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4145
- name: Tag published packages
4246
run: node scripts/tag-published-packages.mjs publish.log
4347
- name: Push created tags

packages/libs/logger/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@human-protocol/logger",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "Unified logging package for HUMAN Protocol",
55
"type": "commonjs",
66
"main": "dist/index.js",

0 commit comments

Comments
 (0)