66 pull_request :
77 branches :
88 - beta
9+ merge_group :
10+ types :
11+ - checks_requested
12+
13+ env :
14+ NODE_OPTIONS : --experimental-vm-modules
915
1016jobs :
1117 lint :
1824 uses : ./.github/actions/setup
1925
2026 - name : Lint files
21- run : yarn lint './**/*.{ts,tsx,js,jsx}' --ignore-pattern node_modules
27+ run : yarn lint
2228
2329 - name : Typecheck files
2430 run : yarn typecheck
@@ -50,156 +56,52 @@ jobs:
5056 - name : Setup
5157 uses : ./.github/actions/setup
5258
59+ - name : Install missing dependencies
60+ run : yarn add -D @ark/schema || echo "Package already installed or not needed"
61+
5362 - name : Build package
54- run : yarn prepack
63+ run : yarn prepare
5564
56- build-android :
65+ build-web :
5766 runs-on : ubuntu-latest
58- env :
59- TURBO_CACHE_DIR : .turbo/android
60- ANDROID_HOME : /usr/local/lib/android/sdk
61- JAVA_HOME : /usr/lib/jvm/zulu-17-amd64
62- steps :
63- - name : Checkout
64- uses : actions/checkout@v4
65-
66- - name : Setup
67- uses : ./.github/actions/setup
68-
69- - name : Cache turborepo for Android
70- uses : actions/cache@v4
71- with :
72- path : ${{ env.TURBO_CACHE_DIR }}
73- key : ${{ runner.os }}-turborepo-android-${{ hashFiles('**/yarn.lock') }}
74- restore-keys : |
75- ${{ runner.os }}-turborepo-android-
76-
77- - name : Check turborepo cache for Android
78- run : |
79- TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
80-
81- if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
82- echo "turbo_cache_hit=1" >> $GITHUB_ENV
83- fi
84-
85- - name : Install JDK
86- if : env.turbo_cache_hit != 1
87- uses : actions/setup-java@v4
88- with :
89- distribution : ' zulu'
90- java-version : ' 17'
91-
92- - name : Set up Android SDK
93- if : env.turbo_cache_hit != 1
94- uses : android-actions/setup-android@v2
95- with :
96- api-level : 30
97- build-tools : 30.0.3
98- ndk : " 23.1.7779620"
99-
100- - name : Create local.properties
101- if : env.turbo_cache_hit != 1
102- run : |
103- echo "sdk.dir=$ANDROID_HOME" > example/android/local.properties
104-
105- - name : Finalize Android SDK
106- if : env.turbo_cache_hit != 1
107- run : |
108- /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
109-
110- - name : Cache Gradle
111- if : env.turbo_cache_hit != 1
112- uses : actions/cache@v4
113- with :
114- path : |
115- ~/.gradle/wrapper
116- ~/.gradle/caches
117- key : ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
118- restore-keys : |
119- ${{ runner.os }}-gradle-
120-
121- - name : Build example for Android
122- run : |
123- yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
124-
125- build-ios :
126- runs-on : macos-latest
127- env :
128- TURBO_CACHE_DIR : .turbo/ios
12967 steps :
13068 - name : Checkout
13169 uses : actions/checkout@v4
13270
13371 - name : Setup
13472 uses : ./.github/actions/setup
13573
136- - name : Cache turborepo for iOS
137- uses : actions/cache@v4
138- with :
139- path : ${{ env.TURBO_CACHE_DIR }}
140- key : ${{ runner.os }}-turborepo-ios-${{ hashFiles('**/yarn.lock') }}
141- restore-keys : |
142- ${{ runner.os }}-turborepo-ios-
74+ - name : Prepare library
75+ run : yarn prepare
14376
144- - name : Check turborepo cache for iOS
77+ - name : Build example for Web
14578 run : |
146- TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
147-
148- if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
149- echo "turbo_cache_hit=1" >> $GITHUB_ENV
150- fi
151-
152- - name : Cache cocoapods
153- if : env.turbo_cache_hit != 1
154- id : cocoapods-cache
155- uses : actions/cache@v4
156- with :
157- path : |
158- **/ios/Pods
159- key : ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
160- restore-keys : |
161- ${{ runner.os }}-cocoapods-
162-
163- - name : Install cocoapods
164- if : env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
165- run : |
166- yarn example pods
167- env :
168- NO_FLIPPER : 1
169-
170- - name : Build example for iOS
171- run : |
172- yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" 2>&1 | grep -i error > ios_errorlog.txt
173-
174- - name : Upload iOS error log
175- uses : actions/upload-artifact@v4
176- with :
177- name : ios-error-log
178- path : ios_errorlog.txt
79+ yarn example expo export --platform web
17980
18081 publish-beta :
181- needs : [lint, test, build-library, build-android, build-ios ]
82+ needs : [lint, test, build-library, build-web ]
18283 runs-on : ubuntu-latest
18384 permissions :
18485 contents : write # To publish a GitHub release
18586 issues : write # To comment on released issues
18687 pull-requests : write # To comment on released pull requests
18788 id-token : write # To enable use of OIDC for npm provenance
89+ if : github.ref == 'refs/heads/main'
18890 steps :
18991 - name : Checkout
19092 uses : actions/checkout@v4
19193 with :
19294 fetch-depth : 0 # Ensures all tags are fetched
19395
96+ - name : Setup
97+ uses : ./.github/actions/setup
98+
19499 - name : Setup Node.js
195100 uses : actions/setup-node@v4
196101 with :
197102 node-version : " lts/*" # Use the latest LTS version of Node.js
198103 registry-url : ' https://registry.npmjs.org/' # Specify npm registry
199104
200- - name : Install dependencies
201- run : npm ci # Clean install dependencies based on the lock file
202-
203105 - name : Verify the integrity of provenance attestations and registry signatures for installed dependencies
204106 run : npm audit signatures # Check the signatures to verify integrity
205107
@@ -210,3 +112,4 @@ jobs:
210112
211113 # Why NODE_AUTH_TOKEN instead of NPM_TOKEN: https://github.com/semantic-release/semantic-release/issues/2313
212114 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }} # npm token for publishing package
115+
0 commit comments