| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- name: release
- on:
- pull_request:
- paths:
- - 'scripts/release_testing_setup.sh'
- - '.github/workflows/release.yml'
- - 'Gemfile*'
- workflow_dispatch:
- schedule:
- # Run every day at 9pm (PST) - cron uses UTC times
- - cron: '0 5 * * *'
- env:
- FIREBASE_CI: true
- concurrency:
- group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
- cancel-in-progress: true
- jobs:
- specs_checking:
- # Don't run on private repo unless it is a PR.
- if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
- runs-on: macos-14
- env:
- botaccess: ${{ secrets.RELEASE_TESTING_PAT }}
- local_repo: specsreleasing
- podspec_repo_branch: main
- outputs:
- matrix: ${{ steps.generate_matrix.outputs.matrix }}
- steps:
- - name: Checkout code
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- - name: Generate matrix
- id: generate_matrix
- run: |
- cd "${GITHUB_WORKSPACE}/ReleaseTooling"
- swift run manifest --sdk-repo-url "${GITHUB_WORKSPACE}" --output-file-path ./output.json --for-gha-matrix-generation
- echo "::set-output name=matrix::{\"include\":$( cat output.json )}"
- - name: Update SpecsReleasing repo setup
- run: |
- podspec_repo_branch="${podspec_repo_branch}" \
- scripts/release_testing_setup.sh release_testing
- - name: Clean spec repo
- run: |
- git clone --quiet https://"$botaccess"@github.com/Firebase/SpecsReleasing.git "${local_repo}"
- cd "${local_repo}"
- # Remove all unhidden dirs, i.e. all podspec dir from the spec repo.
- rm -Rf -- */
- git add .
- # commit without diff will throw an error. `git diff --exit-code` can avoid such error.
- git diff --staged --exit-code || git commit -m "Empty spec repo."
- # Attempt to push. If it fails, print a detailed error message and exit.
- git push || {
- echo "--------------------------------------------------------------------------------"
- echo "ERROR: Failed to push to Firebase/SpecsReleasing."
- echo "This is likely due to an expired Personal Access Token (PAT)."
- echo "Please take the following steps to resolve this:"
- echo "1. Refresh the OSS bot's scoped access token for the Firebase/SpecsReleasing repo."
- echo " This can be done in the OSS bot's GitHub account settings. Ensure the token "
- echo " has the 'public_repo' scope."
- echo "2. Update the 'RELEASE_TESTING_PAT' secret in this repo's settings."
- echo " (https://github.com/Firebase/firebase-ios-sdk/settings/secrets/actions)"
- echo "--------------------------------------------------------------------------------"
- exit 1
- }
- - uses: actions/upload-artifact@v4
- with:
- name: firebase-ios-sdk
- path: |
- *.podspec
- *.podspec.json
- buildup_SpecsReleasing_repo_FirebaseCore:
- needs: specs_checking
- uses: ./.github/workflows/reusable_release_buildup_repo.yml
- with:
- pod_name: FirebaseCore
- secrets:
- bot_access_token: ${{ secrets.RELEASE_TESTING_PAT }}
- buildup_SpecsReleasing_repo:
- needs: [buildup_SpecsReleasing_repo_FirebaseCore, specs_checking]
- strategy:
- fail-fast: false
- matrix: ${{fromJson(needs.specs_checking.outputs.matrix)}}
- uses: ./.github/workflows/reusable_release_buildup_repo.yml
- with:
- pod_name: ${{ matrix.podspec }}
- allow_warnings: ${{ matrix.allowwarnings }}
- secrets:
- bot_access_token: ${{ secrets.RELEASE_TESTING_PAT }}
- abtesting_quickstart:
- needs: buildup_SpecsReleasing_repo
- uses: ./.github/workflows/reusable_release_quickstart.yml
- with:
- product: abtesting
- runs-on: macos-14
- legacy: true
- test-swift: false # The script only supports one argument.
- secrets:
- plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- bot_access_token: ${{ secrets.RELEASE_TESTING_PAT }}
- auth_quickstart:
- needs: buildup_SpecsReleasing_repo
- uses: ./.github/workflows/reusable_release_quickstart.yml
- with:
- product: Authentication
- runs-on: macos-15
- xcode-version: 16.2
- secrets:
- plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- bot_access_token: ${{ secrets.RELEASE_TESTING_PAT }}
- crashlytics_quickstart:
- needs: buildup_SpecsReleasing_repo
- uses: ./.github/workflows/reusable_release_quickstart.yml
- with:
- product: Crashlytics
- runs-on: macos-14
- legacy: true
- extra-setup: |
- mkdir -p quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics
- cp Crashlytics/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
- cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
- secrets:
- plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- bot_access_token: ${{ secrets.RELEASE_TESTING_PAT }}
- database_quickstart:
- needs: buildup_SpecsReleasing_repo
- uses: ./.github/workflows/reusable_release_quickstart.yml
- with:
- product: database
- runs-on: macos-14
- test-objc: true
- test-swift: true
- secrets:
- plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- bot_access_token: ${{ secrets.RELEASE_TESTING_PAT }}
- firestore_quickstart:
- needs: buildup_SpecsReleasing_repo
- uses: ./.github/workflows/reusable_release_quickstart.yml
- with:
- product: firestore
- runs-on: macos-14
- secrets:
- plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- bot_access_token: ${{ secrets.RELEASE_TESTING_PAT }}
- inappmessaging_quickstart:
- needs: buildup_SpecsReleasing_repo
- uses: ./.github/workflows/reusable_release_quickstart.yml
- with:
- product: inappmessaging
- runs-on: macos-14
- test-objc: true
- test-swift: true
- secrets:
- plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- bot_access_token: ${{ secrets.RELEASE_TESTING_PAT }}
- messaging_quickstart:
- needs: buildup_SpecsReleasing_repo
- uses: ./.github/workflows/reusable_release_quickstart.yml
- with:
- product: messaging
- runs-on: macos-14
- test-objc: true
- test-swift: true
- secrets:
- plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- bot_access_token: ${{ secrets.RELEASE_TESTING_PAT }}
- remoteconfig_quickstart:
- needs: buildup_SpecsReleasing_repo
- uses: ./.github/workflows/reusable_release_quickstart.yml
- with:
- product: config
- runs-on: macos-14
- secrets:
- plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- bot_access_token: ${{ secrets.RELEASE_TESTING_PAT }}
- storage_quickstart:
- needs: buildup_SpecsReleasing_repo
- uses: ./.github/workflows/reusable_release_quickstart.yml
- with:
- product: storage
- runs-on: macos-14
- legacy: true
- secrets:
- plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- bot_access_token: ${{ secrets.RELEASE_TESTING_PAT }}
- performance_quickstart:
- needs: buildup_SpecsReleasing_repo
- uses: ./.github/workflows/reusable_release_quickstart.yml
- with:
- product: performance
- runs-on: macos-14
- legacy: true
- secrets:
- plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- bot_access_token: ${{ secrets.RELEASE_TESTING_PAT }}
|