release.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. name: release
  2. permissions:
  3. contents: read
  4. on:
  5. pull_request:
  6. paths:
  7. - '.github/workflows/release.yml'
  8. - 'Gemfile*'
  9. workflow_dispatch:
  10. schedule:
  11. # Run every day at 10pm (PDT) / 1am (EDT) - cron uses UTC times
  12. - cron: '0 5 * * *'
  13. env:
  14. FIREBASE_CI: true
  15. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: true
  16. concurrency:
  17. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  18. cancel-in-progress: true
  19. jobs:
  20. # TODO: The functions quickstart uses Material which isn't supported by Xcode 15
  21. # functions_quickstart:
  22. # # Don't run on private repo unless it is a PR.
  23. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  24. # needs: buildup_SpecsReleasing_repo
  25. # env:
  26. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  27. # botaccess: ${{ secrets.RELEASE_TESTING_PAT }}
  28. # runs-on: macos-12
  29. # steps:
  30. # - uses: actions/checkout@v4
  31. # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  32. # - name: Setup testing repo and quickstart
  33. # run: BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh functions nightly_release_testing
  34. # - name: install secret googleservice-info.plist
  35. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  36. # quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  37. # - name: Setup custom URL scheme
  38. # run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  39. # - name: Test objc quickstart
  40. # run: ([ -z $plist_secret ] ||
  41. # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
  42. # - name: Test swift quickstart
  43. # run: ([ -z $plist_secret ] ||
  44. # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
  45. # - name: Remove data before upload
  46. # if: ${{ failure() }}
  47. # run: scripts/remove_data.sh functions
  48. # - uses: actions/upload-artifact@v4
  49. # if: ${{ failure() }}
  50. # with:
  51. # name: quickstart_artifacts_functions
  52. # path: quickstart-ios/
  53. quickstart:
  54. if: |
  55. github.repository == 'firebase/firebase-ios-sdk' &&
  56. contains(fromJSON('["schedule", "pull_request", "workflow_dispatch"]'), github.event_name)
  57. strategy:
  58. fail-fast: false
  59. matrix:
  60. include:
  61. - product: Performance
  62. run_tests: true
  63. - product: Storage
  64. run_tests: false
  65. - product: Config
  66. run_tests: true
  67. - product: Messaging
  68. run_tests: false
  69. - product: InAppMessaging
  70. run_tests: false
  71. - product: Firestore
  72. run_tests: false
  73. - product: Database
  74. run_tests: false
  75. - product: Authentication
  76. run_tests: false
  77. - product: Crashlytics
  78. run_tests: true
  79. - product: ABTesting
  80. run_tests: false
  81. name: 'quickstart (release, ${{ matrix.product }}, run_tests: ${{ matrix.run_tests }})'
  82. env:
  83. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  84. botaccess: ${{ secrets.RELEASE_TESTING_PAT }}
  85. runs-on: macos-15
  86. steps:
  87. - uses: actions/checkout@v4
  88. with:
  89. fetch-depth: 0 # Required for pulling down repo tags.
  90. - name: Set Xcode version
  91. run: sudo xcode-select -s /Applications/Xcode_16.4.app
  92. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  93. - name: Prereqs
  94. run: gem install xcpretty
  95. - name: Setup testing repo and quickstart
  96. run: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh ${{ matrix.product }} nightly_release_testing
  97. - name: Install Secret GoogleService-Info.plist
  98. run: |
  99. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-${{ matrix.product }}.plist.gpg \
  100. quickstart-ios/${{ matrix.product }}/GoogleService-Info.plist "$plist_secret"
  101. - name: Build Quickstart
  102. uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
  103. with:
  104. timeout_minutes: 15
  105. max_attempts: 3
  106. retry_wait_seconds: 120
  107. command: DIR=${{ matrix.product }} scripts/test_quickstart.sh ${{ matrix.product }} ${{ matrix.run_tests }}
  108. - name: Remove data before upload
  109. # if: ${{ failure() }}
  110. run: scripts/remove_data.sh ${{ matrix.product }}
  111. # - uses: actions/upload-artifact@v4
  112. # if: ${{ failure() }}
  113. # with:
  114. # name: quickstart_artifacts_${{ matrix.product }}
  115. # path: quickstart-ios/