Skip to content

Commit 79641d3

Browse files
authored
ci: Switch to trusted publishing (#233)
* ci: Switch to trusted publishing * remove redundant npm install
1 parent 26a9497 commit 79641d3

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/CODEOWNERS

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

.github/workflows/release-please.yml

Lines changed: 9 additions & 3 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:
@@ -30,10 +31,15 @@ jobs:
3031
node-version: lts/*
3132
registry-url: https://registry.npmjs.org
3233
if: ${{ steps.release.outputs.release_created }}
33-
- run: npm publish --provenance
34-
env:
35-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
34+
35+
# npm 11.5.1 or later is required so update to latest to be sure
36+
- name: Update npm
37+
run: npm install -g npm@latest
38+
39+
- name: Publish to npm
40+
run: npm publish --provenance
3641
if: ${{ steps.release.outputs.release_created }}
42+
3743
- run: 'npx @humanwhocodes/tweet "generator-eslint ${{ steps.release.outputs.tag_name }} has been released: ${{ steps.release.outputs.html_url }}"'
3844
if: ${{ steps.release.outputs.release_created }}
3945
env:

0 commit comments

Comments
 (0)