Skip to content

Commit c667bb1

Browse files
committed
Add OIDC to npm
1 parent 092a4ca commit c667bb1

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/actions/prepare/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ runs:
77
with:
88
cache: yarn
99
node-version-file: '.nvmrc'
10+
registry-url: 'https://registry.npmjs.org'
1011

1112
- name: Yarn install
1213
run: yarn install --frozen-lockfile

.github/workflows/deploy-rc.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,25 @@ jobs:
1111
changesets:
1212
name: Deploy
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
id-token: write # Required for OIDC
1417
steps:
1518
- uses: actions/checkout@v3
1619
with:
1720
token: ${{ secrets.SHOPIFY_GH_ACCESS_TOKEN }}
1821

1922
- uses: ./.github/workflows/actions/prepare
2023

24+
- name: Update npm to latest
25+
run: npm install -g npm@latest
26+
2127
- id: changesets
2228
name: Create release Pull Request or publish to NPM
2329
uses: changesets/action@v1
2430
with:
2531
title: Version Packages (${{ github.ref_name }})
2632
publish: yarn run deploy
2733
env:
28-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
34+
NPM_TOKEN: '' # Forces OIDC authentication
2935
GITHUB_TOKEN: ${{ secrets.SHOPIFY_GH_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)