Skip to content

Commit 4c9436f

Browse files
authored
fix(ci): use up-to-date npm version for Trusted Publishers (#315)
* fix(ci): use up-to-date npm version for Trusted Publishers * test(ci): check versions * chore: remove test workflow
1 parent ca38e76 commit 4c9436f

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ on:
66
types: [published]
77

88
permissions:
9-
id-token: write # Required for OIDC
9+
id-token: write # Required for OIDC
1010
contents: read
1111

1212
jobs:
1313
release:
14-
runs-on: ubuntu-22.04
14+
runs-on: ubuntu-24.04
15+
1516
steps:
1617
- uses: actions/checkout@v4
1718

@@ -21,6 +22,11 @@ jobs:
2122
node-version: 20.x
2223
registry-url: "https://registry.npmjs.org"
2324

25+
- name: Update npm
26+
# We need to make sure we're using npm v11.5+ to use Trusted Publishers
27+
# Reference: https://docs.npmjs.com/trusted-publishers
28+
run: npm install -g npm@11
29+
2430
- name: "Install dependencies"
2531
run: npm ci
2632

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212

1313
jobs:
1414
lint:
15-
runs-on: ubuntu-22.04
15+
runs-on: ubuntu-24.04
1616
steps:
1717
- uses: actions/checkout@v4
1818
- run: npx prettier@2.8.8 --check .
@@ -37,7 +37,7 @@ jobs:
3737
]
3838
node-version: ["18.x", "20.x"]
3939

40-
runs-on: ubuntu-22.04
40+
runs-on: ubuntu-24.04
4141
steps:
4242
- uses: actions/checkout@v4
4343

@@ -64,7 +64,7 @@ jobs:
6464
clean-up:
6565
if: ${{ always() }}
6666
needs: test
67-
runs-on: ubuntu-22.04
67+
runs-on: ubuntu-24.04
6868
steps:
6969
- uses: actions/checkout@v4
7070

0 commit comments

Comments
 (0)