From 03a0a8c7ff287db68d9d56568a6343f28e9046d5 Mon Sep 17 00:00:00 2001 From: Adam Simon Date: Mon, 20 Oct 2025 11:24:31 +0200 Subject: [PATCH 1/3] Configure GitHub workflow to use trusted publishing --- .../workflows/configcat-publicapi-node-ci.yml | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/configcat-publicapi-node-ci.yml b/.github/workflows/configcat-publicapi-node-ci.yml index b97ddc0..217604e 100644 --- a/.github/workflows/configcat-publicapi-node-ci.yml +++ b/.github/workflows/configcat-publicapi-node-ci.yml @@ -6,44 +6,49 @@ on: tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ] pull_request: branches: [ master ] - + workflow_dispatch: - + jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: 18 - name: Install dependencies run: npm install - + - name: Build run: npm run build publish: needs: test - runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags') + runs-on: ubuntu-latest + permissions: + id-token: write # Required for OIDC (see also https://docs.npmjs.com/trusted-publishers) + contents: read steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: - node-version: 18 + node-version: 22 registry-url: 'https://registry.npmjs.org' + # Ensure npm 11.5.1 or later is installed + - name: Update npm + run: npm install -g npm@latest + - name: Install dependencies run: npm install - + - name: Build run: npm run build - name: 🚀Publish run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }} From fb1028c76deb58245a3f6ac2b0eb065c4f8a4d27 Mon Sep 17 00:00:00 2001 From: Adam Simon Date: Mon, 20 Oct 2025 11:26:22 +0200 Subject: [PATCH 2/3] Specify repo URL --- package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.json b/package.json index 5b0893f..0ca9fe8 100644 --- a/package.json +++ b/package.json @@ -16,5 +16,9 @@ "@types/bluebird": "^3.5.33", "@types/node": "^12", "typescript": "^4.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/configcat/configcat-publicapi-node-client" } } From 5dcde6ad913b379f4477985c5cd117b871ca60da Mon Sep 17 00:00:00 2001 From: Adam Simon Date: Mon, 20 Oct 2025 11:26:42 +0200 Subject: [PATCH 3/3] Bump version --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ad83e5d..02b85b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "configcat-publicapi-node-client", - "version": "3.0.2", + "version": "3.0.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "configcat-publicapi-node-client", - "version": "3.0.2", + "version": "3.0.3", "dependencies": { "axios": "^1.6.7", "bluebird": "^3.5.0" diff --git a/package.json b/package.json index 0ca9fe8..bdd1240 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "configcat-publicapi-node-client", - "version": "3.0.2", + "version": "3.0.3", "description": "NodeJS client for configcat-publicapi-node-client", "main": "dist/index.js", "types": "dist/index.d.ts",