diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5e6b876 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,55 @@ +name: Build and Deploy + +on: + push: + branches: + - initial + +jobs: + android-build: + name: Android Dev Build + runs-on: ubuntu-latest + container: + image: reactnativecommunity/react-native-android + steps: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.9.1 + - name: Checkout repo from dev branch + uses: actions/checkout@v3 + with: + ref: initial + - name: Install npm dependency + run: npm install + - name: Setup Android SDK + uses: android-actions/setup-android@v2 + - uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + - name: Execute Gradle build + run: | + cd android + ./gradlew build + - name: Build Android JS Bundle + run: | + npm run package-android + - name: Delete Android build duplicate assets resource + run: npm run delete-pics + - name: Install bundler + run: | + cd android + gem install bundler + - name: Install gem plugins + run: | + cd android + bundle install + - name: Run fastlane + run: | + cd android + bundle exec fastlane build_qa diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 6014bf6..e4ead20 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -38,6 +38,24 @@ platform :android do build_type: "Debug" ) + firebase_app_distribution( + app: ENV["APP_ID"], + testers: ENV["TESTERS"], + release_notes: ENV["RELEASE_NOTES"], + android_artifact_path: ENV["ANDROID_ARTEFACT_PATH"], + service_credentials_file: ENV["SERVICE_CREDENTIALS_FILE"] + ) + end + +platform :android do + desc "Build a debug version of the app" + lane :build_release do + gradle( + project_dir: "./android", + task: "bundle", + build_type: "Debug" + ) + firebase_app_distribution( app: ENV["APP_ID"], testers: ENV["TESTERS"],