docs(getting-started): revamp guides with CLI-first approach #440
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: pr-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-changeset: | |
| name: Check changeset | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Check changeset | |
| if: github.ref != 'refs/heads/main' | |
| run: yarn changeset status --since=origin/${{ github.base_ref }} | |
| build-lint: | |
| name: Build & static code analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - 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 (version) | |
| run: | | |
| yarn workspace @callstack/react-native-brownfield brownfield --version | |
| android-tester-integrated: | |
| name: Android road test (TesterIntegrated) | |
| runs-on: ubuntu-latest | |
| needs: build-lint | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Prepare Android environment | |
| uses: ./.github/actions/prepare-android | |
| - name: Restore Gradle cache | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-android-tester-integrated-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-android-tester-integrated-gradle- | |
| # == TesterIntegrated == | |
| - name: Generate Brownie stores | |
| run: yarn run brownfield:codegen | |
| - name: Build integrated Android tester app | |
| run: yarn run build:tester-integrated:android | |
| android-rnapp-androidapp: | |
| name: Android road test (RNApp & AndroidApp) | |
| runs-on: ubuntu-latest | |
| needs: build-lint | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Prepare Android environment | |
| uses: ./.github/actions/prepare-android | |
| - name: Restore Gradle cache | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-android-rnapp-androidapp-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-android-rnapp-androidapp-gradle- | |
| # == RNApp == | |
| - name: Package AAR with the Brownfield CLI | |
| run: | | |
| cd apps/RNApp | |
| yarn run brownfield:package:android | |
| - name: Publish AAR artifact to Maven Local | |
| run: | | |
| cd apps/RNApp | |
| yarn run brownfield:publish:android | |
| - 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 | |
| # == AndroidApp == | |
| - name: Build native Android Brownfield app | |
| run: | | |
| yarn run build:example:android-consumer | |
| ios-tester-integrated: | |
| name: iOS road test (TesterIntegrated) | |
| runs-on: macos-26 | |
| needs: build-lint | |
| env: &ios_env | |
| USE_CCACHE: 1 | |
| CCACHE_DIR: ${{ github.workspace }}/.ios_ccache | |
| CCACHE_BASEDIR: ${{ github.workspace }} | |
| CCACHE_COMPRESS: '1' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Prepare iOS environment | |
| uses: ./.github/actions/prepare-ios | |
| - name: Install ccache | |
| run: brew install ccache | |
| - name: Enable ccache | |
| run: echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH | |
| - name: Restore TesterIntegrated ccache | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 | |
| with: | |
| path: | | |
| .ios_ccache | |
| key: ${{ runner.os }}-tester-integrated-ios-ccache-${{ hashFiles('apps/TesterIntegrated/swift/Podfile.lock', 'apps/TesterIntegrated/swift/SwiftExample.xcodeproj/project.pbxproj') }} | |
| restore-keys: | | |
| ${{ runner.os }}-tester-integrated-ios-ccache- | |
| # == TesterIntegrated == | |
| - name: Restore Pods cache (TesterIntegrated) | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 | |
| with: | |
| path: | | |
| apps/TesterIntegrated/swift/Pods | |
| key: ${{ runner.os }}-tester-integrated-ios-pods-${{ hashFiles('apps/TesterIntegrated/swift/Podfile.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-tester-integrated-ios-pods- | |
| - name: Install pods (TesterIntegrated) | |
| run: | | |
| cd apps/TesterIntegrated/swift | |
| pod install | |
| - name: Restore DerivedData cache (TesterIntegrated) | |
| uses: actions/cache@v5 | |
| with: | |
| path: apps/TesterIntegrated/swift/build | |
| key: ${{ runner.os }}-ios-tester-integrated-derived-data-${{ hashFiles('apps/TesterIntegrated/swift/Podfile.lock', 'apps/TesterIntegrated/swift/SwiftExample.xcodeproj/project.pbxproj') }} | |
| restore-keys: | | |
| ${{ runner.os }}-ios-tester-integrated-derived-data- | |
| - name: Build integrated iOS tester app | |
| run: | | |
| yarn run build:tester-integrated:ios | |
| # ============== | |
| - name: Log ccache stats | |
| uses: ./.github/actions/ccache-summary | |
| with: | |
| name: TesterIntegrated | |
| ios-rnapp-appleapp: | |
| name: iOS road test (RNApp & AppleApp) | |
| runs-on: macos-26 | |
| needs: build-lint | |
| env: *ios_env | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Prepare iOS environment | |
| uses: ./.github/actions/prepare-ios | |
| - name: Install ccache | |
| run: brew install ccache | |
| - name: Enable ccache | |
| run: echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH | |
| - name: Restore RNApp & AppleApp ccache | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 | |
| with: | |
| path: | | |
| .ios_ccache | |
| key: ${{ runner.os }}-rnapp-appleapp-ios-ccache-${{ hashFiles('apps/RNApp/ios/Podfile.lock', 'apps/RNApp/ios/RNApp.xcodeproj/project.pbxproj', 'apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj') }} | |
| restore-keys: | | |
| ${{ runner.os }}-rnapp-appleapp-ios-ccache- | |
| # == RNApp == | |
| - name: Restore Pods cache (RNApp) | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 | |
| with: | |
| path: | | |
| apps/RNApp/ios/Pods | |
| key: ${{ runner.os }}-rnapp-ios-pods-${{ hashFiles('apps/RNApp/ios/Podfile.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-rnapp-ios-pods- | |
| - name: Install pods (RNApp) | |
| run: | | |
| cd apps/RNApp/ios | |
| pod install | |
| - name: Restore DerivedData cache (RNApp) | |
| uses: actions/cache@v5 | |
| with: | |
| path: apps/RNApp/ios/build | |
| key: ${{ runner.os }}-ios-rnapp-derived-data-${{ hashFiles('apps/RNApp/ios/Podfile.lock', 'apps/RNApp/ios/RNApp.xcodeproj/project.pbxproj') }} | |
| restore-keys: | | |
| ${{ runner.os }}-ios-rnapp-derived-data- | |
| - name: Package iOS framework with the Brownfield CLI | |
| run: | | |
| cd apps/RNApp | |
| yarn run brownfield:package:ios | |
| # == AppleApp == | |
| - name: Build Brownfield iOS native app | |
| run: | | |
| yarn run build:example:ios-consumer | |
| # ============== | |
| - name: Log ccache stats | |
| uses: ./.github/actions/ccache-summary | |
| with: | |
| name: RNApp & AppleApp |