Skip to content

Commit 98b647d

Browse files
authored
Configure GitHub workflow to use trusted publishing (#86)
* Configure GitHub workflow to use trusted publishing * Upgrade configcat-common to v9.4.1 * Bump version
1 parent 45ae923 commit 98b647d

File tree

3 files changed

+45
-31
lines changed

3 files changed

+45
-31
lines changed

.github/workflows/node-ci.yml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ on:
88
tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ]
99
pull_request:
1010
branches: [ master ]
11-
11+
1212
workflow_dispatch:
13-
13+
1414
jobs:
1515
test:
1616
runs-on: ${{ matrix.os }}
@@ -24,60 +24,65 @@ jobs:
2424
os: macOS-latest
2525

2626
steps:
27-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v5
2828

29-
- uses: actions/setup-node@v3
29+
- uses: actions/setup-node@v5
3030
with:
3131
node-version: ${{ matrix.node-version }}
32-
32+
3333
- name: Install dependencies
3434
run: npm install
35-
35+
3636
- name: Build
3737
run: npm run build
38-
38+
3939
- name: Test
4040
run: npm run test
41-
41+
4242
coverage:
4343
needs: test
4444
runs-on: ubuntu-latest
4545
steps:
46-
- uses: actions/checkout@v3
47-
- uses: actions/setup-node@v3
46+
- uses: actions/checkout@v5
47+
- uses: actions/setup-node@v5
4848
with:
4949
node-version: 14
50-
50+
5151
- name: Install dependencies
5252
run: |
5353
npm install codecov -g
5454
npm install
55-
55+
5656
- name: Build
5757
run: npm run build
58-
58+
5959
- name: Test
6060
run: npm run test
61-
61+
6262
- name: Upload coverage report
6363
run: codecov
6464

6565
publish:
6666
needs: coverage
67-
runs-on: ubuntu-latest
6867
if: startsWith(github.ref, 'refs/tags')
68+
runs-on: ubuntu-latest
69+
permissions:
70+
id-token: write # Required for OIDC (see also https://docs.npmjs.com/trusted-publishers)
71+
contents: read
6972
steps:
70-
- uses: actions/checkout@v3
73+
- uses: actions/checkout@v5
7174

72-
- uses: actions/setup-node@v3
75+
- uses: actions/setup-node@v5
7376
with:
74-
node-version: 14
77+
node-version: 22
7578
registry-url: 'https://registry.npmjs.org'
76-
77-
- name: Install dependencies
79+
80+
# Ensure npm 11.5.1 or later is installed
81+
- name: Update npm
82+
run: npm install -g npm@latest
83+
84+
- name: Install dependencies & build
7885
run: npm install
79-
86+
8087
- name: 🚀Publish
8188
run: npm publish
82-
env:
83-
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}

package-lock.json

Lines changed: 15 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "configcat-node",
3-
"version": "11.4.0",
3+
"version": "11.4.1",
44
"description": "Official ConfigCat SDK to help you access your feature flags from a Node.js application.",
55
"main": "lib/client.js",
66
"types": "lib/client.d.ts",
@@ -32,7 +32,7 @@
3232
},
3333
"engine-strict": true,
3434
"dependencies": {
35-
"configcat-common": "9.4.0",
35+
"configcat-common": "9.4.1",
3636
"tslib": "^2.4.1",
3737
"tunnel": "0.0.6"
3838
},

0 commit comments

Comments
 (0)