Skip to content

Commit a1055cf

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

4 files changed

Lines changed: 20 additions & 4 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ 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'
12+
13+
- name: Install npm 11
14+
run: npm install -g npm@11
15+
shell: bash
1116

1217
- name: Cache turbo build setup
1318
uses: actions/cache@v4

.github/workflows/publish.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,21 @@ 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
1619

1720
- name: Setup
1821
uses: ./.github/actions/setup
1922

23+
- name: Debug versions
24+
run: |
25+
node --version
26+
npm --version
27+
2028
- name: Determine NPM tag
2129
id: npm-tag
2230
run: |
@@ -34,11 +42,10 @@ jobs:
3442
3543
- name: Prepare release
3644
run: |
37-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
3845
cp README.md modules/@shopify/checkout-sheet-kit
3946
yarn module clean
4047
yarn module build
4148
cd modules/@shopify/checkout-sheet-kit
4249
npm publish --access public --tag ${{ steps.npm-tag.outputs.tag }}
4350
env:
44-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
51+
NPM_TOKEN: '' # Empty string forces OIDC

dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ up:
1515
ios:
1616
- '26.0'
1717
- node:
18-
version: v20.11.1
18+
version: v22.14.0
1919
yarn: 1.22.22
2020
- custom:
2121
name: Install NPM dependencies

modules/@shopify/checkout-sheet-kit/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"description": "A React Native library for Shopify's Checkout Kit.",
1010
"author": "Shopify",
1111
"homepage": "https://github.com/shopify/checkout-sheet-kit-react-native",
12+
"repository": {
13+
"type": "git",
14+
"url": "https://github.com/Shopify/checkout-sheet-kit-react-native"
15+
},
1216
"publishConfig": {
1317
"registry": "https://registry.npmjs.org/"
1418
},

0 commit comments

Comments
 (0)