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 # Don't run on private repo unless it is a PR. if: github.repository == 'Firebase/firebase-ios-sdk' runs-on: macos-15 env: botaccess: ${{ secrets.RELEASE_TESTING_PAT }} local_repo: specsreleasing local_sdk_repo_dir: /tmp/test/firebase-ios-sdk targeted_pod: FirebaseCore steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4.1.7 with: name: firebase-ios-sdk path: ${{ env.local_sdk_repo_dir }} - name: Update SpecsReleasing repo run: | cd scripts/create_spec_repo/ swift build pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsReleasing.git BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \ --sdk-repo "${local_sdk_repo_dir}" \ --local-spec-repo-name "${local_repo}" \ --pod-sources 'https://github.com/Firebase/SpecsReleasing' "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \ --include-pods "${targeted_pod}" --keep-repo - name: Clean Artifacts if: ${{ always() }} run: pod repo remove "${local_repo}" buildup_SpecsReleasing_repo: needs: [buildup_SpecsReleasing_repo_FirebaseCore, specs_checking] # Don't run on private repo unless it is a PR. if: github.repository == 'Firebase/firebase-ios-sdk' || github.event_name == 'workflow_dispatch' runs-on: macos-15 strategy: fail-fast: false matrix: ${{fromJson(needs.specs_checking.outputs.matrix)}} env: botaccess: ${{ secrets.RELEASE_TESTING_PAT }} local_repo: specsreleasing local_sdk_repo_dir: /tmp/test/firebase-ios-sdk targeted_pod: ${{ matrix.podspec }} steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4.1.7 with: name: firebase-ios-sdk path: ${{ env.local_sdk_repo_dir }} - name: Update SpecsReleasing repo run: | [[ ${{ matrix.allowwarnings }} == true ]] && ALLOWWARNINGS=true cd scripts/create_spec_repo/ swift build pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsReleasing.git # ${ALLOWWARNINGS:+--allow-warnings} will add --allow-warnings to the # command if ${ALLOWWARNINGS} is not null. BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \ --sdk-repo "${local_sdk_repo_dir}" \ --local-spec-repo-name "${local_repo}" \ --pod-sources 'https://github.com/Firebase/SpecsReleasing' "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \ --include-pods "${targeted_pod}" \ --keep-repo ${ALLOWWARNINGS:+--allow-warnings} - name: Clean Artifacts if: ${{ always() }} run: pod repo remove "${local_repo}" quickstart_tests: # 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 == 'pull_request' || github.event_name == 'workflow_dispatch' needs: buildup_SpecsReleasing_repo strategy: fail-fast: false matrix: include: - quickstart-name: "abtesting" legacy: true runs-on: "macos-14" test-command: "([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true)" remove-data-command: "scripts/remove_data.sh config" - quickstart-name: "auth" runs-on: "macos-15" test-command: "([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication false)" xcode-version: "16.2" setup-command: "BOT_TOKEN=\"${botaccess}\" scripts/setup_quickstart.sh Authentication nightly_release_testing" remove-data-command: "scripts/remove_data.sh authentication" - quickstart-name: "crashlytics" legacy: true runs-on: "macos-14" test-command: "([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Crashlytics true swift)" extra-setup-command: | 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/ setup-command: "BOT_TOKEN=\"${botaccess}\" scripts/setup_quickstart.sh Crashlytics nightly_release_testing" remove-data-command: "scripts/remove_data.sh crashlytics" - quickstart-name: "database" runs-on: "macos-14" test-command: | ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false) ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false swift) remove-data-command: "scripts/remove_data.sh database" - quickstart-name: "firestore" runs-on: "macos-14" test-command: "([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Firestore false)" remove-data-command: "scripts/remove_data.sh firestore" - quickstart-name: "inappmessaging" runs-on: "macos-14" test-command: | ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging true) ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging true swift) remove-data-command: "scripts/remove_data.sh inappmessaging" - quickstart-name: "messaging" runs-on: "macos-14" test-command: | ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false) ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false swift) remove-data-command: "scripts/remove_data.sh messaging" - quickstart-name: "remoteconfig" runs-on: "macos-14" test-command: "([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Config true)" setup-command: "BOT_TOKEN=\"${botaccess}\" scripts/setup_quickstart.sh config nightly_release_testing" remove-data-command: "scripts/remove_data.sh config" - quickstart-name: "storage" legacy: true runs-on: "macos-14" test-command: "([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true swift)" remove-data-command: "scripts/remove_data.sh storage" - quickstart-name: "performance" runs-on: "macos-14" test-command: "([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Performance true swift)" setup-command: "BOT_TOKEN=\"${botaccess}\" scripts/setup_quickstart.sh Performance nightly_release_testing" remove-data-command: "scripts/remove_data.sh performance" uses: ./.github/workflows/reusable-quickstart.yml@main with: quickstart-name: ${{ matrix.quickstart-name }} legacy: ${{ matrix.legacy }} runs-on: ${{ matrix.runs-on }} test-command: ${{ matrix.test-command }} extra-setup-command: ${{ matrix.extra-setup-command }} xcode-version: ${{ matrix.xcode-version }} secrets: GHASecretsGPGPassphrase1: ${{ secrets.GHASecretsGPGPassphrase1 }} RELEASE_TESTING_PAT: ${{ secrets.RELEASE_TESTING_PAT }}