Skip to content

Commit 0cef777

Browse files
authored
feat: migrate to trusted publishing (#1680)
* feat: migrate to trusted publishing * chore: comment unused token
1 parent a0cfb39 commit 0cef777

3 files changed

Lines changed: 19 additions & 9 deletions

File tree

.github/workflows/push.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ jobs:
4848
name: Execution Tests Ubuntu
4949
strategy:
5050
matrix:
51-
node: [20, 22]
52-
ts: [5.0.4, 5.1.3, 5.2.2, 5.3.3, 5.4.2, 5.5.3, 5.6.2, 5.7.2, 5.8.2, 5.9.2, next]
51+
node: [24, 22]
52+
ts: [5.0.4, 5.1.3, 5.2.2, 5.3.3, 5.4.2, 5.5.3, 5.6.2, 5.7.2, 5.8.2, 5.9.2] # next excluded for now
5353
runs-on: ubuntu-latest
5454
steps:
5555
- uses: actions/checkout@v3
5656

5757
- name: install node
58-
uses: actions/setup-node@v3
58+
uses: actions/setup-node@v6
5959
with:
6060
node-version: ${{ matrix.node }}
6161

@@ -75,14 +75,14 @@ jobs:
7575
name: Execution Tests Windows
7676
strategy:
7777
matrix:
78-
node: [20, 22]
79-
ts: [5.0.4, 5.1.3, 5.2.2, 5.3.3, 5.4.2, 5.5.3, 5.6.2, 5.7.2, 5.8.2, 5.9.2, next]
78+
node: [24, 22]
79+
ts: [5.0.4, 5.1.3, 5.2.2, 5.3.3, 5.4.2, 5.5.3, 5.6.2, 5.7.2, 5.8.2, 5.9.2] # next excluded for now
8080
runs-on: windows-latest
8181
steps:
8282
- uses: actions/checkout@v3
8383

8484
- name: install node
85-
uses: actions/setup-node@v3
85+
uses: actions/setup-node@v6
8686
with:
8787
node-version: ${{ matrix.node }}
8888

.github/workflows/release.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@ on:
44

55
name: release
66

7+
# Permission to generate an OIDC token for trusted publishing to npm
8+
permissions:
9+
id-token: write
10+
711
jobs:
812
build_test_and_publish:
913
runs-on: ubuntu-latest
1014
steps:
1115
- uses: actions/checkout@v3
1216

1317
- name: install node
14-
uses: actions/setup-node@v3
18+
uses: actions/setup-node@v6
1519
with:
16-
node-version: 20
20+
node-version: 24
1721
registry-url: https://registry.npmjs.org/
1822

1923
- name: install
@@ -25,6 +29,9 @@ jobs:
2529
- name: test
2630
run: yarn execution-tests
2731

32+
- run: npm install -g npm@latest
33+
2834
- run: npm publish
2935
env:
30-
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
36+
NPM_CONFIG_PROVENANCE: true
37+
# NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} no longer needed with trusted publishing and OIDC token generation

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,8 @@
101101
"peerDependencies": {
102102
"typescript": "*",
103103
"webpack": "^5.0.0"
104+
},
105+
"publishConfig": {
106+
"provenance": true
104107
}
105108
}

0 commit comments

Comments
 (0)