Skip to content

Commit 77fd268

Browse files
authored
Merge pull request #134 from JairajJangle/fixes/misc
Fixes/misc
2 parents 2e69f41 + 63511e5 commit 77fd268

File tree

114 files changed

+18595
-21815
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+18595
-21815
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ If applicable, add screenshots/screen records to help explain your problem.
3131
- Version of Node.js: [e.g. 14.15.0]
3232
- Version of NPM: [e.g. 7.0.0]
3333
- Version of @shopify/flash-list: [e.g. 2.0.0]
34-
- Version of react-native-paper: [e.g. 4.9.2]
3534
- Version of react-native-vector-icons: [e.g. 8.1.0]
3635

3736
**Additional Context**

.github/actions/setup/action.yml

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,60 @@ runs:
99
with:
1010
node-version-file: .nvmrc
1111

12-
- name: Cache dependencies
12+
# Create a minimal .yarnrc.yml without any plugin references
13+
- name: Create minimal Yarn config
14+
run: |
15+
cat > .yarnrc.yml << EOF
16+
nodeLinker: node-modules
17+
nmHoistingLimits: workspaces
18+
EOF
19+
shell: bash
20+
21+
# Setup Corepack for proper Yarn version management
22+
- name: Setup Corepack and Yarn
23+
run: |
24+
corepack enable
25+
corepack prepare [email protected] --activate
26+
yarn --version
27+
shell: bash
28+
29+
- name: Configure Yarn and Generate .yarnrc.yml
30+
run: |
31+
yarn set version 4.9.2
32+
yarn config set nodeLinker node-modules
33+
yarn config set nmHoistingLimits workspaces
34+
shell: bash
35+
36+
- name: Verify .yarnrc.yml
37+
run: |
38+
cat .yarnrc.yml
39+
shell: bash
40+
41+
- name: Restore Yarn Cache
42+
uses: actions/cache/restore@v4
1343
id: yarn-cache
14-
uses: actions/cache@v4
1544
with:
1645
path: |
1746
**/node_modules
18-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
47+
.yarn/cache
48+
.yarn/unplugged
49+
.yarn/install-state.gz
50+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
1951
restore-keys: |
20-
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
52+
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
2153
${{ runner.os }}-yarn-
2254
2355
- name: Install dependencies
24-
if: steps.yarn-cache.outputs.cache-hit != 'true'
25-
run: |
26-
yarn install --cwd example --frozen-lockfile
27-
yarn install --frozen-lockfile
28-
yarn patch-package
56+
run: yarn install
2957
shell: bash
58+
59+
- name: Save Yarn Cache
60+
uses: actions/cache/save@v4
61+
if: steps.yarn-cache.outputs.cache-hit != 'true'
62+
with:
63+
path: |
64+
**/node_modules
65+
.yarn/cache
66+
.yarn/unplugged
67+
.yarn/install-state.gz
68+
key: ${{ steps.yarn-cache.outputs.cache-primary-key }}

.github/workflows/beta-release.yml

Lines changed: 19 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
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

1016
jobs:
1117
lint:
@@ -18,7 +24,7 @@ jobs:
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,141 +56,37 @@ 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/beta'
18890
steps:
18991
- name: Checkout
19092
uses: actions/checkout@v4
@@ -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

Comments
 (0)