feat: cli and repo rework #213
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Build packages | |
| run: yarn build | |
| - name: Lint files | |
| run: yarn lint | |
| - name: Typecheck files | |
| run: yarn typecheck | |
| - name: Test Brownfield CLI | |
| run: | | |
| yarn workspace @callstack/react-native-brownfield brownfield --version | |
| rn-android: | |
| name: RN Android App & AAR | |
| runs-on: ubuntu-latest | |
| needs: build-lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Build packages | |
| run: yarn build | |
| - name: Build Android RN app | |
| run: | | |
| cd apps/tester-from-source/kotlin | |
| ./gradlew assembleDebug | |
| - name: Package AAR with the Brownfield CLI | |
| run: | | |
| cd apps/RNApp | |
| node ../../packages/react-native-brownfield/node_modules/.bin/brownfield package:android --module-name :BrownfieldLib --variant release | |
| - name: Publish AAR artifact to Maven Local | |
| run: | | |
| cd apps/RNApp/android/BrownfieldLib | |
| node ../../packages/react-native-brownfield/node_modules/.bin/brownfield publish:android --module-name :BrownfieldLib | |
| - name: Verify debug AAR exists in Maven Local | |
| run: stat ~/.m2/repository/com/rnapp/brownfieldlib/0.0.1-local/brownfieldlib-0.0.1-local-debug.aar | |
| - name: Verify release AAR exists in Maven Local | |
| run: stat ~/.m2/repository/com/rnapp/brownfieldlib/0.0.1-local/brownfieldlib-0.0.1-local-release.aar | |
| - name: Build Brownfield Android native app | |
| run: | | |
| cd apps/AndroidApp | |
| ./gradlew assembleDebug | |
| rn-ios: | |
| name: RN iOS App & XCFramework | |
| runs-on: macos-latest | |
| needs: build-lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use appropriate Xcode version | |
| uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 | |
| with: | |
| xcode-version: '16' | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'yarn' | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.2' | |
| bundler-cache: true | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Build packages | |
| run: yarn build | |
| - name: Install pods | |
| run: | | |
| cd apps/tester-from-source/swift | |
| pod install | |
| - name: Build iOS RN app | |
| run: | | |
| cd apps/RNApp/ios | |
| xcodebuild -workspace RNApp.xcworkspace -scheme RNApp -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16' build CODE_SIGNING_ALLOWED=NO | |
| - name: Package iOS Framework with the Brownfield CLI | |
| run: | | |
| cd apps/RNApp | |
| node ../../packages/react-native-brownfield/node_modules/.bin/brownfield package:ios --workspace RNApp --scheme BrownfieldLib | |
| - name: Build Brownfield iOS native app | |
| run: | | |
| cd apps/iOSApp | |
| xcodebuild -workspace iOSApp.xcworkspace -scheme iOSApp -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16' build CODE_SIGNING_ALLOWED=NO |