Skip to content

Commit dcdd5ca

Browse files
authored
ci: setup npm trusted publisher (#516)
* ci: setup npm trusted publisher * chore: update changesets versions, use nvmrc on ci, update npm cli
1 parent e944b34 commit dcdd5ca

8 files changed

Lines changed: 123 additions & 99 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,31 @@ jobs:
1111
release:
1212
permissions:
1313
contents: write # to create release (changesets/action)
14-
id-token: write # Required for provenance
14+
id-token: write # required for OIDC, Trusted Publishing, and Provenance
1515
pull-requests: write # to create pull request (changesets/action)
1616
name: Release
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout Repo
2020
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2121

22-
- name: Setup Node.js 20
22+
- name: Setup Node.js
2323
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
2424
with:
25-
node-version: 20
25+
node-version-file: '.nvmrc'
2626

2727
- name: Install Dependencies
2828
run: yarn
2929

30+
- name: Update npm
31+
run: npm install -g npm@latest # to ensure Trusted Publishing works correctly
32+
3033
- name: Create Release Pull Request or Publish to NPM
31-
uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1.5.3
34+
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
3235
with:
3336
version: yarn version-packages
3437
publish: yarn publish-packages
35-
commit: "chore(release): version packages"
36-
title: "chore(release): version packages"
38+
commit: 'chore(release): version packages'
39+
title: 'chore(release): version packages'
3740
env:
3841
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
NPM_CONFIG_PROVENANCE: true
40-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/*
1+
lts/krypton

apps/example/ios/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,7 +1748,7 @@ PODS:
17481748
- React-RCTFBReactNativeSpec
17491749
- ReactCommon/turbomodule/core
17501750
- SocketRocket
1751-
- react-native-bottom-tabs (1.1.0):
1751+
- react-native-bottom-tabs (1.2.0):
17521752
- boost
17531753
- DoubleConversion
17541754
- fast_float
@@ -1766,7 +1766,7 @@ PODS:
17661766
- React-graphics
17671767
- React-ImageManager
17681768
- React-jsi
1769-
- react-native-bottom-tabs/common (= 1.1.0)
1769+
- react-native-bottom-tabs/common (= 1.2.0)
17701770
- React-NativeModulesApple
17711771
- React-RCTFabric
17721772
- React-renderercss
@@ -1778,7 +1778,7 @@ PODS:
17781778
- SocketRocket
17791779
- SwiftUIIntrospect (~> 1.0)
17801780
- Yoga
1781-
- react-native-bottom-tabs/common (1.1.0):
1781+
- react-native-bottom-tabs/common (1.2.0):
17821782
- boost
17831783
- DoubleConversion
17841784
- fast_float
@@ -2842,7 +2842,7 @@ SPEC CHECKSUMS:
28422842
React-logger: a3cb5b29c32b8e447b5a96919340e89334062b48
28432843
React-Mapbuffer: 9d2434a42701d6144ca18f0ca1c4507808ca7696
28442844
React-microtasksnativemodule: 75b6604b667d297292345302cc5bfb6b6aeccc1b
2845-
react-native-bottom-tabs: e33312fc663d163f0be73d3474dfb448ba38dad8
2845+
react-native-bottom-tabs: 5b7b8ee99ea2f19a496cabe8f6ec322b4d86c28d
28462846
react-native-safe-area-context: c6e2edd1c1da07bdce287fa9d9e60c5f7b514616
28472847
React-NativeModulesApple: 879fbdc5dcff7136abceb7880fe8a2022a1bd7c3
28482848
React-oscompat: 93b5535ea7f7dff46aaee4f78309a70979bdde9d

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"useTabs": false
5757
},
5858
"dependencies": {
59-
"@changesets/changelog-github": "^0.5.0",
60-
"@changesets/cli": "^2.27.10"
59+
"@changesets/changelog-github": "^0.6.0",
60+
"@changesets/cli": "^2.30.0"
6161
}
6262
}

packages/expo-template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"repository": {
1414
"type": "git",
15-
"url": "git+https://github.com/callstackincubator/react-native-bottom-tabs.git"
15+
"url": "git+https://github.com/callstack/react-native-bottom-tabs.git"
1616
},
1717
"jest": {
1818
"preset": "jest-expo"

packages/react-native-bottom-tabs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@
4949
],
5050
"repository": {
5151
"type": "git",
52-
"url": "git+https://github.com/callstackincubator/react-native-bottom-tabs.git"
52+
"url": "git+https://github.com/callstack/react-native-bottom-tabs.git"
5353
},
5454
"author": "Oskar Kwasniewski <oskarkwasniewski@icloud.com> (https://github.com/okwasniewski)",
5555
"license": "MIT",
5656
"bugs": {
57-
"url": "https://github.com/callstackincubator/react-native-bottom-tabs/issues"
57+
"url": "https://github.com/callstack/react-native-bottom-tabs/issues"
5858
},
59-
"homepage": "https://github.com/callstackincubator/react-native-bottom-tabs#readme",
59+
"homepage": "https://github.com/callstack/react-native-bottom-tabs#readme",
6060
"publishConfig": {
6161
"registry": "https://registry.npmjs.org/",
6262
"access": "public"

packages/react-navigation/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@
4343
],
4444
"repository": {
4545
"type": "git",
46-
"url": "git+https://github.com/callstackincubator/react-native-bottom-tabs.git"
46+
"url": "git+https://github.com/callstack/react-native-bottom-tabs.git"
4747
},
4848
"author": "Oskar Kwasniewski <oskarkwasniewski@icloud.com> (https://github.com/okwasniewski)",
4949
"license": "MIT",
5050
"bugs": {
51-
"url": "https://github.com/callstackincubator/react-native-bottom-tabs/issues"
51+
"url": "https://github.com/callstack/react-native-bottom-tabs/issues"
5252
},
53-
"homepage": "https://github.com/callstackincubator/react-native-bottom-tabs#readme",
53+
"homepage": "https://github.com/callstack/react-native-bottom-tabs#readme",
5454
"publishConfig": {
5555
"registry": "https://registry.npmjs.org/",
5656
"access": "public"

0 commit comments

Comments
 (0)