Skip to content

Commit 5e9e0ea

Browse files
authored
Merge branch 'firebase:main' into JesusRojas/#11903
2 parents 57b9b44 + 3f3a288 commit 5e9e0ea

File tree

191 files changed

+52937
-587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+52937
-587
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ReleaseTooling/ @firebase/firebase-ios-sdk-admin
22
FirebaseCore/ @firebase/firebase-ios-sdk-admin
3-
Package.swift @firebase/firebase-ios-sdk-admin
3+
/Package.swift @firebase/firebase-ios-sdk-admin
44
Dangerfile @firebase/firebase-ios-sdk-admin
55
**/Public @firebase/firebase-ios-sdk-admin
66
*.podspec @firebase/firebase-ios-sdk-admin

.github/actions/notices_generation/action.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ inputs:
1515
search-local-pod-version:
1616
description: 'Add pod version from local spec repo'
1717
required: true
18-
default: false
19-
type: boolean
18+
default: 'false'
2019
notices-path:
2120
description: 'Path of Notices file containing all licences.'
2221
required: true
@@ -30,14 +29,20 @@ runs:
3029
with:
3130
ruby-version: "2.7"
3231
- name: Generate a NOTICES file
32+
env:
33+
PODS: ${{ inputs.pods }}
34+
SOURCES: ${{ inputs.sources }}
35+
MIN_IOS_VERSION: ${{ inputs.min-ios-version }}
36+
SEARCH_LOCAL_POD_VERSION: ${{ inputs.search-local-pod-version }}
37+
NOTICES_PATH: ${{ inputs.notices-path }}
3338
run: |
3439
cd "${{ github.action_path }}"
3540
bundle install
36-
if ${{ inputs.search-local-pod-version == 'true' }} ; then
37-
ruby app.rb --pods ${{ inputs.pods }} --sources ${{ inputs.sources }} --min_ios_version ${{ inputs.min-ios-version }} --search_local_pod_version --notices_path ${{ inputs.notices-path }}
38-
else
39-
ruby app.rb --pods ${{ inputs.pods }} --sources ${{ inputs.sources }} --min_ios_version ${{ inputs.min-ios-version }} --notices_path ${{ inputs.notices-path }}
41+
args=("--pods" "$PODS" "--sources" "$SOURCES" "--min_ios_version" "$MIN_IOS_VERSION" "--notices_path" "$NOTICES_PATH")
42+
if [ "$SEARCH_LOCAL_POD_VERSION" == "true" ]; then
43+
args+=("--search_local_pod_version")
4044
fi
45+
ruby app.rb "${args[@]}"
4146
shell: bash
4247
- name: Upload artifacts
4348
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0

.github/workflows/_build.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ jobs:
6565
else
6666
has_secrets="false"
6767
fi
68-
echo "has_secrets=$has_secrets" >> $GITHUB_OUTPUT
68+
echo "has_secrets=$has_secrets" >> "$GITHUB_OUTPUT"
6969
7070
# 2. Determine if the build job should run.
7171
# - Skip if on a fork AND secrets are present.
7272
repo_full_name=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
7373
if [[ "$repo_full_name" != "firebase/firebase-ios-sdk" && "$has_secrets" == "true" ]]; then
74-
echo "should_run=false" >> $GITHUB_OUTPUT
74+
echo "should_run=false" >> "$GITHUB_OUTPUT"
7575
else
76-
echo "should_run=true" >> $GITHUB_OUTPUT
76+
echo "should_run=true" >> "$GITHUB_OUTPUT"
7777
fi
7878
7979
build:
@@ -94,6 +94,8 @@ jobs:
9494
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
9595
steps:
9696
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
97+
with:
98+
persist-credentials: false
9799
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
98100
if: inputs.method != 'spm' && inputs.method != 'spmbuildonly' && inputs.method != 'cmake'
99101
- name: Setup Bundler
@@ -105,20 +107,24 @@ jobs:
105107
retry_wait_seconds: 300
106108
command: scripts/setup_bundler.sh
107109
- name: Xcode
108-
run: sudo xcode-select -s /Applications/${{ inputs.xcode }}.app/Contents/Developer
110+
env:
111+
XCODE_VERSION: ${{ inputs.xcode }}
112+
run: sudo xcode-select -s /Applications/"$XCODE_VERSION".app/Contents/Developer
109113
- name: Install simulators
110114
if: inputs.platform != 'macOS' && inputs.platform != 'catalyst'
115+
env:
116+
PLATFORM_INPUT: ${{ inputs.platform }}
111117
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
112118
with:
113119
timeout_minutes: 15
114120
max_attempts: 5
115121
retry_wait_seconds: 120
116122
continue_on_error: true
117123
command: |
118-
if [[ "${{ inputs.platform }}" == "all" ]]; then
124+
if [[ "$PLATFORM_INPUT" == "all" ]]; then
119125
xcodebuild -downloadAllPlatforms
120126
else
121-
xcodebuild -downloadPlatform ${{ inputs.platform }}
127+
xcodebuild -downloadPlatform "$PLATFORM_INPUT"
122128
fi
123129
- name: Run setup command
124130
if: inputs.setup_command != ''

.github/workflows/_cocoapods.cron.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ jobs:
6464
flags: ${{ fromJson(inputs.flags) }}
6565
steps:
6666
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
67+
with:
68+
persist-credentials: false
6769
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
6870
- name: Setup Bundler
6971
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
@@ -73,10 +75,12 @@ jobs:
7375
retry_wait_seconds: 300
7476
command: scripts/setup_bundler.sh
7577
- name: Xcode
76-
run: sudo xcode-select -s /Applications/${{ inputs.xcode }}.app/Contents/Developer
78+
env:
79+
XCODE_VERSION: ${{ inputs.xcode }}
80+
run: sudo xcode-select -s /Applications/"$XCODE_VERSION".app/Contents/Developer
7781
- name: Set FIREBASE_CI, if needed.
7882
if: inputs.ignore_deprecation_warnings == true
79-
run: echo "FIREBASE_CI=true" >> $GITHUB_ENV
83+
run: echo "FIREBASE_CI=true" >> "$GITHUB_ENV"
8084
- name: Run setup command, if needed.
8185
if: inputs.setup_command != ''
8286
env:

.github/workflows/_cocoapods.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,11 @@ jobs:
139139
steps:
140140
- name: Skip, if applicable.
141141
# Skip matrix combinations that weren't requested, while preserving the specific macos-14 / iOS inclusion.
142-
if: contains(join(inputs.platforms), matrix.platform) == false && matrix.os != 'macos-14'
142+
if: contains(inputs.platforms, matrix.platform) == false && matrix.os != 'macos-14'
143143
run: exit 0
144144
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
145+
with:
146+
persist-credentials: false
145147
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
146148
- name: Setup Bundler
147149
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
@@ -163,18 +165,20 @@ jobs:
163165
command: xcodebuild -downloadPlatform ${{ matrix.platform }}
164166
- name: Set conditional environment variable, if needed.
165167
if: inputs.product == 'FirebaseAuth'
166-
run: echo "FIREBASE_CI=true" >> $GITHUB_ENV
168+
run: echo "FIREBASE_CI=true" >> "$GITHUB_ENV"
167169
- name: Set podspec Swift version to 6.0, if supported.
168170
if: inputs.supports_swift6 == true && matrix.os != 'macos-14'
169-
run: sed -i "" "s/s.swift_version[[:space:]]*=[[:space:]]*'5.9'/s.swift_version = '6.0'/" ${{ inputs.product }}.podspec
171+
env:
172+
PRODUCT: ${{ inputs.product }}
173+
run: sed -i "" "s/s.swift_version[[:space:]]*=[[:space:]]*'5.9'/s.swift_version = '6.0'/" "$PRODUCT".podspec
170174
- name: Run setup command, if needed.
171175
if: inputs.setup_command != ''
172176
env:
173177
plist_secret: ${{ secrets.plist_secret }}
174178
run: ${{ inputs.setup_command }}
175179
- name: Lint ${{ inputs.product }}.podspec for ${{ matrix.platform }}
176180
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
177-
if: contains(join(inputs.platforms), matrix.platform) || matrix.os == 'macos-14'
181+
if: contains(inputs.platforms, matrix.platform) || matrix.os == 'macos-14'
178182
with:
179183
timeout_minutes: ${{ inputs.timeout_minutes }}
180184
max_attempts: 3

.github/workflows/_quickstart.framework.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,16 @@ on:
5454

5555
jobs:
5656
quickstart_framework:
57-
if: ${{ !cancelled() }}
57+
if: github.event.pull_request.head.repo.fork == false && !cancelled()
5858
env:
5959
plist_secret: ${{ secrets.plist_secret }}
6060
SDK: ${{ inputs.product }}
6161
SCHEME: ${{ inputs.scheme }}
6262
runs-on: ${{ inputs.os }}
6363
steps:
6464
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
65+
with:
66+
persist-credentials: false
6567
- name: Get framework dir
6668
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
6769
with:
@@ -70,7 +72,9 @@ jobs:
7072
github-token: ${{ secrets.github_token }}
7173
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
7274
- name: Xcode
73-
run: sudo xcode-select -s /Applications/${{ inputs.xcode }}.app/Contents/Developer
75+
env:
76+
XCODE_VERSION: ${{ inputs.xcode }}
77+
run: sudo xcode-select -s /Applications/"$XCODE_VERSION".app/Contents/Developer
7478
- name: Setup Bundler
7579
run: ./scripts/setup_bundler.sh
7680
- name: Move frameworks
@@ -80,8 +84,11 @@ jobs:
8084
- name: Setup quickstart
8185
run: ${{ inputs.setup_command }}
8286
- name: Install Secret GoogleService-Info.plist
83-
run: scripts/decrypt_gha_secret.sh ${{ inputs.plist_src_path }} \
84-
${{ inputs.plist_dst_path }} "$plist_secret"
87+
env:
88+
PLIST_SRC_PATH: ${{ inputs.plist_src_path }}
89+
PLIST_DST_PATH: ${{ inputs.plist_dst_path }}
90+
run: scripts/decrypt_gha_secret.sh "$PLIST_SRC_PATH" \
91+
"$PLIST_DST_PATH" "$plist_secret"
8592
- name: Test Quickstart
8693
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
8794
with:

.github/workflows/_quickstart.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ jobs:
7272
runs-on: macos-15
7373
steps:
7474
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
75+
with:
76+
persist-credentials: false
7577
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
7678
- name: Prereqs
7779
run: gem install xcpretty
@@ -80,30 +82,40 @@ jobs:
8082
- name: Run setup command.
8183
run: ${{ inputs.setup_command }}
8284
- name: Install Secret GoogleService-Info.plist
85+
env:
86+
PLIST_SRC_PATH: ${{ inputs.plist_src_path }}
87+
PLIST_DST_PATH: ${{ inputs.plist_dst_path }}
8388
run: |
8489
scripts/decrypt_gha_secret.sh \
85-
${{ inputs.plist_src_path }} \
86-
${{ inputs.plist_dst_path }} \
90+
"$PLIST_SRC_PATH" \
91+
"$PLIST_DST_PATH" \
8792
"$plist_secret"
8893
- name: Build ${{ inputs.product }} Quickstart
8994
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
95+
env:
96+
PRODUCT: ${{ inputs.product }}
97+
RUN_TESTS: ${{ inputs.run_tests }}
9098
with:
9199
timeout_minutes: 15
92100
max_attempts: 3
93101
retry_wait_seconds: 120
94102
command: |
95-
SPM=true DIR=${{ inputs.product }} scripts/test_quickstart.sh \
96-
${{ inputs.product }} \
97-
${{ inputs.run_tests }}
103+
SPM=true DIR="$PRODUCT" scripts/test_quickstart.sh \
104+
"$PRODUCT" \
105+
"$RUN_TESTS"
98106
# Failure sequence to upload artifact.
99107
- id: lowercase_product
100108
if: failure()
109+
env:
110+
PRODUCT: ${{ inputs.product }}
101111
run: |
102-
lowercase_product=$(echo "${{ inputs.product }}" | tr '[:upper:]' '[:lower:]')
103-
echo "lowercase_product=$lowercase_product" >> $GITHUB_OUTPUT
112+
lowercase_product=$(echo "$PRODUCT" | tr '[:upper:]' '[:lower:]')
113+
echo "lowercase_product=$lowercase_product" >> "$GITHUB_OUTPUT"
104114
- name: Remove data before upload.
105115
if: failure()
106-
run: scripts/remove_data.sh ${{ steps.lowercase_product.outputs.lowercase_product }}
116+
env:
117+
LOWERCASE_PRODUCT: ${{ steps.lowercase_product.outputs.lowercase_product }}
118+
run: scripts/remove_data.sh "$LOWERCASE_PRODUCT"
107119
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
108120
if: failure()
109121
with:

.github/workflows/_spm.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ jobs:
112112
runs-on: ${{ matrix.os }}
113113
steps:
114114
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
115+
with:
116+
persist-credentials: false
115117
- uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
116118
with:
117119
path: .build
@@ -133,17 +135,19 @@ jobs:
133135
- name: Initialize xcodebuild
134136
run: scripts/setup_spm_tests.sh
135137
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
136-
if: contains(join(inputs.platforms), matrix.platform) || matrix.os == 'macos-14'
138+
if: contains(inputs.platforms, matrix.platform) || matrix.os == 'macos-14'
137139
env:
138140
FIREBASE_IS_NIGHTLY_TESTING: ${{ inputs.is_nightly && '1' || '' }}
141+
TARGET: ${{ inputs.target }}
142+
PLATFORM: ${{ matrix.platform }}
139143
with:
140144
timeout_minutes: 15
141145
max_attempts: 3
142146
retry_wait_seconds: 120
143147
command: |
144148
./scripts/build.sh \
145-
${{ inputs.target }} \
146-
${{ matrix.platform }} \
149+
"$TARGET" \
150+
"$PLATFORM" \
147151
${{ (contains(inputs.buildonly_platforms, matrix.platform) || contains(inputs.buildonly_platforms, 'all')) && 'spmbuildonly' || 'spm' }}
148152
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
149153
if: ${{ failure() }}

.github/workflows/infra.api_diff.yml

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,16 @@ env:
1313
BASE_API_OUTPUT: ci_outputs/base_branch_api
1414
DIFF_REPORT_OUTPUT: ci_outputs/diff_report
1515

16+
permissions:
17+
contents: read
18+
pull-requests: write
19+
1620
jobs:
1721
diff_report:
1822
runs-on: macos-latest
23+
permissions:
24+
contents: read
25+
pull-requests: write
1926
env:
2027
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
2128

@@ -24,14 +31,15 @@ jobs:
2431
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2532
with:
2633
fetch-depth: 2
34+
persist-credentials: false
2735

2836
- name: Copy diff report tools
2937
run: cp -a scripts/api_diff_report/. ~/api_diff_report
3038

3139
- id: get_changed_files
3240
name: Get changed file list
3341
run: |
34-
echo "file_list=$(git diff --name-only -r HEAD^1 HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT
42+
echo "file_list=$(git diff --name-only -r HEAD^1 HEAD | tr '\n' ' ')" >> "$GITHUB_OUTPUT"
3543
3644
- name: Setup python
3745
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
@@ -42,27 +50,36 @@ jobs:
4250
run: ~/api_diff_report/prerequisite.sh
4351

4452
- name: Clean Diff Report Comment in PR
53+
env:
54+
STAGE: ${{ env.STAGE_PROGRESS }}
55+
TOKEN: ${{github.token}}
56+
PR_NUMBER: ${{github.event.pull_request.number}}
57+
RUN_ID: ${{github.run_id}}
4558
run: |
4659
python ~/api_diff_report/pr_commenter.py \
47-
--stage ${{ env.STAGE_PROGRESS }} \
48-
--token ${{github.token}} \
49-
--pr_number ${{github.event.pull_request.number}} \
50-
--commit $GITHUB_SHA \
51-
--run_id ${{github.run_id}}
60+
--stage "$STAGE" \
61+
--token "$TOKEN" \
62+
--pr_number "$PR_NUMBER" \
63+
--commit "$GITHUB_SHA" \
64+
--run_id "$RUN_ID"
5265
5366
- name: Generate API files for PR branch
67+
env:
68+
FILE_LIST: ${{ steps.get_changed_files.outputs.file_list }}
5469
run: |
5570
python ~/api_diff_report/api_info.py \
56-
--file_list ${{ steps.get_changed_files.outputs.file_list }} \
71+
--file_list "$FILE_LIST" \
5772
--output_dir ${{ env.PR_API_OUTPUT }}
5873
5974
- name: Checkout Base branch
6075
run: git checkout HEAD^
6176

6277
- name: Generate API files for Base branch
78+
env:
79+
FILE_LIST: ${{ steps.get_changed_files.outputs.file_list }}
6380
run: |
6481
python ~/api_diff_report/api_info.py \
65-
--file_list ${{ steps.get_changed_files.outputs.file_list }} \
82+
--file_list "$FILE_LIST" \
6683
--output_dir ${{ env.BASE_API_OUTPUT }}
6784
6885
- name: Generate API Diff Report
@@ -73,14 +90,20 @@ jobs:
7390
--output_dir ${{ env.DIFF_REPORT_OUTPUT }}
7491
7592
- name: Update Diff Report Comment in PR
93+
env:
94+
STAGE: ${{ env.STAGE_END }}
95+
REPORT: ${{ env.DIFF_REPORT_OUTPUT }}
96+
TOKEN: ${{github.token}}
97+
PR_NUMBER: ${{github.event.pull_request.number}}
98+
RUN_ID: ${{github.run_id}}
7699
run: |
77100
python ~/api_diff_report/pr_commenter.py \
78-
--stage ${{ env.STAGE_END }} \
79-
--report ${{ env.DIFF_REPORT_OUTPUT }} \
80-
--token ${{github.token}} \
81-
--pr_number ${{github.event.pull_request.number}} \
82-
--commit $GITHUB_SHA \
83-
--run_id ${{github.run_id}}
101+
--stage "$STAGE" \
102+
--report "$REPORT" \
103+
--token "$TOKEN" \
104+
--pr_number "$PR_NUMBER" \
105+
--commit "$GITHUB_SHA" \
106+
--run_id "$RUN_ID"
84107
85108
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
86109
if: ${{ !cancelled() }}

0 commit comments

Comments
 (0)