Skip to content

Commit 658d12d

Browse files
committed
update publish.yml with new OIDC auth
1 parent 8361e0b commit 658d12d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,24 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
id-token: write # Required for OIDC
9+
contents: read
10+
711
jobs:
812
publish:
913
runs-on: ubuntu-latest
1014
env:
1115
CLOUDSMITH_API_TOKEN: ${{ secrets.CLOUDSMITH_TOKEN }}
12-
NPM_TOKEN: ${{ secrets.NPM_REGISTRY_ACCESS_TOKEN }}
1316
NPM_TAG: ${{ github.event.release.prerelease && 'pre' || 'latest' }}
1417
steps:
1518
- uses: actions/checkout@v2
1619
- uses: actions/setup-node@v1
1720
with:
1821
node-version: "22"
22+
- name: Update npm
23+
run: npm install -g npm@latest
24+
- run: npm ci
1925
- name: Prepare Main
2026
run: |
2127
cd packages/fa-icon-chooser
@@ -26,7 +32,7 @@ jobs:
2632
- name: Publish Main - npmjs
2733
run: |
2834
cd packages/fa-icon-chooser
29-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
35+
echo "//registry.npmjs.org/" > .npmrc
3036
npm publish --access public --registry=https://registry.npmjs.org --tag ${NPM_TAG}
3137
- name: Prepare React
3238
run: |
@@ -36,7 +42,7 @@ jobs:
3642
- name: Publish React - npmjs
3743
run: |
3844
cd packages/fa-icon-chooser-react
39-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
45+
echo "//registry.npmjs.org/" > .npmrc
4046
npm publish --access public --registry=https://registry.npmjs.org --tag ${NPM_TAG}
4147
- name: Publish Main - Cloudsmith
4248
run: |

0 commit comments

Comments
 (0)