Skip to content

Commit 5e7bd8f

Browse files
chore(ci): migrate to npm trusted publishing
1 parent 47e101f commit 5e7bd8f

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
permissions:
1818
contents: read
19-
id-token: write
19+
id-token: write # Required for OIDC
2020

2121
steps:
2222
- name: Checkout
@@ -26,7 +26,6 @@ jobs:
2626
uses: actions/setup-node@v6
2727
with:
2828
node-version: lts/*
29-
registry-url: 'https://registry.npmjs.com'
3029
check-latest: true
3130
- name: Setup Yarn
3231
run: corepack enable
@@ -37,9 +36,8 @@ jobs:
3736
- name: Build
3837
run: yarn build
3938

40-
- name: Publish
41-
run: |
42-
npm install -g npm@latest
43-
npm publish --provenance
44-
env:
45-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
- name: Update npm
40+
run: npm install -g npm@latest
41+
42+
- name: Trusted Publish with Provenance
43+
run: npm publish

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
"homepage": "https://github.com/JasonWeinzierl/eslint-plugin-rxjs-angular-x",
1010
"repository": {
1111
"type": "git",
12-
"url": "https://github.com/JasonWeinzierl/eslint-plugin-rxjs-angular-x.git"
12+
"url": "git+https://github.com/JasonWeinzierl/eslint-plugin-rxjs-angular-x.git"
13+
},
14+
"publishConfig": {
15+
"provenance": true,
16+
"registry": "https://registry.npmjs.org"
1317
},
1418
"bugs": {
1519
"url": "https://github.com/JasonWeinzierl/eslint-plugin-rxjs-angular-x/issues"

0 commit comments

Comments
 (0)