Skip to content

Commit bf4da07

Browse files
ci: Use Trusted publishing (#87)
1 parent 8605a3c commit bf4da07

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.github/actions/setup-tools/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ runs:
77
- name: Install Node.js
88
uses: actions/setup-node@v4
99
with:
10-
node-version: 20
10+
node-version: 22 # semantic-release requires at least this version
11+
- name: Update npm # To ensure npm 11.5.1 or later is installed for Trusted publishing
12+
shell: bash
13+
run: npm install -g npm@latest
1114
- name: Install dependencies
1215
shell: bash
1316
run: npm i

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ permissions:
1212
contents: write
1313
issues: write
1414
deployments: write
15+
id-token: write # to enable use of OIDC for npm provenance and trusted publishing
1516

1617
jobs:
1718
setup:
@@ -46,5 +47,4 @@ jobs:
4647
env:
4748
GITHUB_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
4849
GH_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
49-
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
5050
run: npx semantic-release

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
"@rollup/wasm-node": "~4.19.0",
6464
"@semantic-release/changelog": "^6.0.3",
6565
"@semantic-release/git": "^10.0.1",
66-
"@semantic-release/github": "^10.1.2",
67-
"@semantic-release/npm": "^12.0.1",
66+
"@semantic-release/github": "^12.0.0",
67+
"@semantic-release/npm": "^13.1.1",
6868
"@typescript-eslint/eslint-plugin": "~7.17.0",
6969
"@typescript-eslint/parser": "~7.17.0",
7070
"eslint": "^8.56.0",
@@ -73,7 +73,7 @@
7373
"prettier": "~3.3.3",
7474
"prettier-plugin-java": "~2.6.4",
7575
"rimraf": "^3.0.2",
76-
"semantic-release": "^24.0.0",
76+
"semantic-release": "^25.0.1",
7777
"swiftlint": "^1.0.2",
7878
"typescript": "~5.4.5",
7979
"vite": "^5.2.11",

0 commit comments

Comments
 (0)