Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 42 additions & 2 deletions .github/workflows/release.zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ on:
description: 'Run ID of a previous successful zip workflow to use for quickstart testing'
required: false
default: ''
build_firestore_only:
description: 'Build only FirebaseFirestoreInternal XCFramework'
required: false
default: 'false'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Expand All @@ -58,6 +62,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
should_package: ${{ steps.check.outputs.should_package }}
build_firestore_only: ${{ steps.check.outputs.build_firestore_only }}
steps:
- name: Fail workflow if PINNED_RUN_ID is set on a schedule
if: github.event_name == 'schedule' && env.PINNED_RUN_ID != ''
Expand All @@ -68,11 +73,17 @@ jobs:
id: check
env:
ZIP_RUN_ID: ${{ github.event.inputs.zip_run_id }}
BUILD_FIRESTORE_ONLY: ${{ github.event.inputs.build_firestore_only }}
run: |
if [[ -n "${{ env.PINNED_RUN_ID }}" || -n "$ZIP_RUN_ID" ]]; then
if [[ "${BUILD_FIRESTORE_ONLY}" == "true" ]]; then
echo "should_package=false" >> "$GITHUB_OUTPUT"
echo "build_firestore_only=true" >> "$GITHUB_OUTPUT"
elif [[ -n "${{ env.PINNED_RUN_ID }}" || -n "$ZIP_RUN_ID" ]]; then
echo "should_package=false" >> "$GITHUB_OUTPUT"
echo "build_firestore_only=false" >> "$GITHUB_OUTPUT"
else
echo "should_package=true" >> "$GITHUB_OUTPUT"
echo "build_firestore_only=false" >> "$GITHUB_OUTPUT"
fi

package-release:
Expand Down Expand Up @@ -108,6 +119,35 @@ jobs:
# name of.
path: release_zip_dir

build-firestore-xcframework:
needs: should_package
if: needs.should_package.outputs.build_firestore_only == 'true'
runs-on: macos-26
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Xcode
run: sudo xcode-select -s /Applications/${{ env.MIN_XCODE }}.app/Contents/Developer
- name: Build Firestore XCFramework
# The version '12.14.0' below is a placeholder value to trick ZipBuilder into thinking versions were specified.
# This prevents it from auto-including all other local podspecs in the repo.
# The actual local podspec will still be used because we pass `--local-podspec-path ..`.
run: |
mkdir -p firestore_xcframework_dir
cd ReleaseTooling
echo '[{"name": "FirebaseAppCheckInterop", "version": "12.14.0", "platforms": ["ios", "macos", "tvos"]}]' > pods.json
swift run zip-builder --zip-pods pods.json --disable-build-dependencies --output-dir ../firestore_xcframework_dir --local-podspec-path .. --platforms ios macos tvos
- name: Repackage XCFramework with symlinks
run: |
unzip firestore_xcframework_dir/Frameworks.zip -d unpack_dir
cd unpack_dir/Binaries
zip --symlinks -q -r -dg ../../FirebaseAppCheckInterop.zip FirebaseAppCheckInterop.xcframework
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
path: FirebaseAppCheckInterop.zip
archive: false

build:
needs: should_package
# Don't run on private repo unless it is a PR.
Expand Down Expand Up @@ -163,7 +203,7 @@ jobs:
packaging_done:
runs-on: ubuntu-latest
needs: [package-head]
if: always()
if: always() && github.event.inputs.build_firestore_only != 'true'
outputs:
run_id: ${{ steps.get_run_id.outputs.run_id }}
steps:
Expand Down
Loading