Skip to content

Commit 135f196

Browse files
update publish workflow to use OIDC authentication
1 parent ed50490 commit 135f196

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ runs:
77
- name: Setup Node.js
88
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
99
with:
10-
node-version: 20
10+
node-version: 22
11+
registry-url: 'https://registry.npmjs.org'
1112

1213
- name: Cache turbo build setup
1314
uses: actions/cache@v4

.github/workflows/publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010
release:
1111
name: Release
1212
runs-on: ubuntu-latest
13+
permissions:
14+
id-token: write
15+
contents: read
1316
steps:
1417
- name: Checkout
1518
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -34,11 +37,10 @@ jobs:
3437
3538
- name: Prepare release
3639
run: |
37-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
3840
cp README.md modules/@shopify/checkout-sheet-kit
3941
yarn module clean
4042
yarn module build
4143
cd modules/@shopify/checkout-sheet-kit
4244
npm publish --access public --tag ${{ steps.npm-tag.outputs.tag }}
4345
env:
44-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
NPM_TOKEN: '' # Empty string forces OIDC

0 commit comments

Comments
 (0)