From c93d518f6f56045716abe3916f76c40dbbb704a0 Mon Sep 17 00:00:00 2001 From: Maha Benzekri Date: Fri, 10 Apr 2026 10:03:25 +0200 Subject: [PATCH 1/2] migrate npm publish to OIDC trusted publishing This commit updates the release workflow to use npm trusted publishing (OIDC) instead of NPM_TOKEN. it also adds required job permissions for npm OIDC auth: id-token: write and contents: read. Npm publish was kept explicit with --access public. package.json repository metadata was updated to npm-recommended object format. Issue:HD-4608 --- .github/workflows/release.yaml | 9 +++++---- package.json | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d9eeb544..5dce8154 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,18 +37,19 @@ jobs: publish-npm: runs-on: ubuntu-latest needs: check + permissions: + id-token: write + contents: read environment: npmjs steps: - uses: actions/checkout@v4 # Setup .npmrc file to publish to npmjs.org - uses: actions/setup-node@v4 with: - node-version: '22' + node-version: '24' registry-url: 'https://registry.npmjs.org' - run: npm install - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: npm publish --access public release-github: runs-on: ubuntu-latest needs: diff --git a/package.json b/package.json index 8f98d77b..f1b3a385 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,10 @@ "sourceMap": true, "instrument": true }, - "repository": "git://github.com/scality/hdclient.git ", + "repository": { + "type": "git", + "url": "https://github.com/scality/hdclient.git" + }, "author": "Maxime Lubin", "dependencies": { "httpagent": "github:scality/httpagent#1.1.0", From 194716cb1144fb420159f2669172b9e14ef2e9ae Mon Sep 17 00:00:00 2001 From: Maha Benzekri Date: Mon, 13 Apr 2026 11:39:46 +0200 Subject: [PATCH 2/2] bump checkout and node actions to v6 Issue: HD-4608 --- .github/workflows/release.yaml | 10 +++++----- .github/workflows/tests.yaml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5dce8154..fd3c17ed 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,7 +13,7 @@ jobs: name: preliminary-checks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Ensure version is properly set run: | test "$(npm -s run get-version)" = "${{ github.event.inputs.tag }}" @@ -24,9 +24,9 @@ jobs: runs-on: ubuntu-latest needs: check steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 # Setup .npmrc file to publish to GitHub Packages - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 with: node-version: '22' registry-url: 'https://npm.pkg.github.com' @@ -42,9 +42,9 @@ jobs: contents: read environment: npmjs steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 # Setup .npmrc file to publish to npmjs.org - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 with: node-version: '24' registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d0e49e89..1d66f38c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -12,8 +12,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + uses: actions/checkout@v6 + - uses: actions/setup-node@v6 with: node-version: '22' cache: 'npm'