Skip to content

Commit 09a0885

Browse files
authored
ci: Switch to trusted publishing (#164)
* ci: Switch to trusted publishing * update npm only when a release is created
1 parent 12575c1 commit 09a0885

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.release-please-manifest.json @eslint/eslint-tsc
2+
.github/workflows/release-please.yml @eslint/eslint-tsc

.github/workflows/release-please.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ on:
22
push:
33
branches:
44
- main
5+
56
name: release-please
67
jobs:
78
release-please:
@@ -22,12 +23,15 @@ jobs:
2223
registry-url: https://registry.npmjs.org
2324
if: ${{ steps.release.outputs.release_created }}
2425

26+
# npm 11.5.1 or later is required so update to latest to be sure
27+
- name: Update npm
28+
run: npm install -g npm@latest
29+
if: ${{ steps.release.outputs.release_created }}
30+
2531
- name: Publish to npm
2632
run: |
2733
npm install
2834
npm publish --provenance
29-
env:
30-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3135
if: ${{ steps.release.outputs.release_created }}
3236

3337
- name: Publish to JSR

0 commit comments

Comments
 (0)