35 - Push Notification #24
This file contains 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 Staging (Android and iOS) | |
env: | |
AAB_PATH: android/app/build/outputs/bundle/release/app-release.aab | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- closed | |
jobs: | |
run-checks: | |
if: | | |
github.event_name == 'workflow_dispatch' || | |
(github.event.pull_request.merged == true && github.base_ref == vars.RELEASE_BRANCH && startsWith(github.head_ref, 'release/')) | |
uses: ./.github/workflows/pull-request-checks.yml | |
build-android: | |
needs: run-checks | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./android | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' # See 'Supported distributions' for available options | |
java-version: '17' | |
- name: Install Packages | |
run: yarn install | |
- name: Decode Keystore | |
run: echo ${{ secrets.ANDROID_UPLOAD_KEY_BASE64 }} | base64 -d > app/upload.jks | |
- name: Make gradlew executable | |
run: chmod +x ./gradlew | |
- name: Build AAB | |
run: ./gradlew bundleRelease | |
env: | |
NUBBLE_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }} | |
NUBBLE_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | |
NUBBLE_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
- name: Decode Google Service Account | |
run: echo ${{ secrets.ANDROID_SERVICE_ACCOUNT_BASE64 }} | base64 -d > google-service-account.json | |
- name: Upload to Google Play | |
run: fastlane upload_internal | |
- name: Upload APK to Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-release.aab | |
path: ${{env.AAB_PATH}} | |
retention-days: 7 | |
build-ios: | |
needs: run-checks | |
runs-on: macos-latest | |
timeout-minutes: 30 | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./ios | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.CERT_REPO_SSH_KEY }} | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install Packages | |
run: yarn install | |
- name: Install CocoaPods | |
run: sudo gem install cocoapods -v 1.15.2 | |
- name: Install IOS dependencies | |
run: pod install | |
- name: Build and Upload to TestFlight | |
run: fastlane beta | |
env: | |
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }} | |
APPLE_KEY_ISSUER_ID: ${{ secrets.APPLE_KEY_ISSUER_ID }} | |
APPLE_KEY_CONTENT: ${{ secrets.APPLE_KEY_CONTENT }} |