π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add Cast TestFlight build workflow
Neeraj Gupta3f803111338e
diff --git a/.github/docs/apple-signing.md b/.github/docs/apple-signing.mdindex 7411cbb7a7..1fbc6ca264 100644--- a/.github/docs/apple-signing.md+++ b/.github/docs/apple-signing.md@@ -118,9 +118,9 @@ Create the profile in Apple Developer > Certificates, Identifiers & Profiles > PRegenerate the profile when the App ID entitlements or Developer ID certificate change.-## Per-app iOS setup+## Per-app App Store setup-Each iOS app needs its own App ID, App Store Connect app, and App Store provisioning profile. The Apple Distribution certificate and App Store Connect API key are reused across apps.+Each App Store app needs its own App ID, App Store Connect app, and App Store provisioning profile. The Apple Distribution certificate and App Store Connect API key are reused across apps.### App ID@@ -132,7 +132,7 @@ In App Store Connect > Apps, create the app record and select the App ID from th### App Store provisioning profile-The iOS archive is manually signed. `-allowProvisioningUpdates` lets Xcode download the existing profile from Apple; the profile itself is not stored in GitHub secrets, but it does need to exist in the portal.+The App Store archive is manually signed. `-allowProvisioningUpdates` lets Xcode download the existing profile from Apple; the profile itself is not stored in GitHub secrets, but it does need to exist in the portal.In Apple Developer > Certificates, Identifiers & Profiles > Profiles, create a new distribution profile:@@ -169,6 +169,10 @@ Ensu:- `io.ente.ensu` -> `Ensu App Store`+Cast:++- `io.ente.frame.tv.cast` -> `Cast App Store`+### EntitlementsWhen adding new entitlements, the profile needs to be regenerated.diff --git a/.github/workflows/cast-build.yml b/.github/workflows/cast-build.ymlnew file mode 100644index 0000000000..8147a30033--- /dev/null+++ b/.github/workflows/cast-build.yml@@ -0,0 +1,97 @@+name: "Build (Cast)"++on:+ workflow_dispatch:++permissions:+ contents: read++concurrency:+ group: cast-build+ cancel-in-progress: false++jobs:+ release:+ runs-on: macos-26+ environment:+ name: production++ steps:+ - name: Checkout+ uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0++ - name: Prepare build metadata+ id: metadata+ working-directory: apple/apps/cast+ run: |+ settings="$(xcodebuild -showBuildSettings -project Cast.xcodeproj -scheme Cast -configuration Release)"+ version="$(awk '$1 == "MARKETING_VERSION" { print $3; exit }' <<< "${settings}")"+ build_base="$(awk '$1 == "CURRENT_PROJECT_VERSION" { print $3; exit }' <<< "${settings}")"+ if [[ ! "${version}" =~ ^[0-9]+\.[0-9]+(\.[0-9]+)?$ ]]; then+ echo "::error::MARKETING_VERSION must be x.y or x.y.z"+ exit 1+ fi+ if [[ ! "${build_base}" =~ ^[0-9]+$ ]]; then+ echo "::error::CURRENT_PROJECT_VERSION must be an integer"+ exit 1+ fi+ if [[ "${GITHUB_REF_NAME}" == release/cast-v* ]]; then+ if [[ "${GITHUB_REF_NAME}" != "release/cast-v${version}" ]]; then+ echo "::error::${GITHUB_REF_NAME} does not match Cast version ${version}"+ exit 1+ fi+ build_number="${build_base}"+ elif [[ "${GITHUB_REF_NAME}" == main ]]; then+ build_number="$((build_base + GITHUB_RUN_NUMBER))"+ else+ echo "::error::Cast builds must run from main or release/cast-v${version}"+ exit 1+ fi+ echo "build_number=${build_number}" >> "${GITHUB_OUTPUT}"++ - name: Generate Cast bindings+ working-directory: rust+ run: cargo codegen native cast++ - name: Import Apple Distribution certificate+ uses: Apple-Actions/import-codesign-certs@5142e029c445c10ffc7149d172e540235a065466 # v7.0.0+ with:+ p12-file-base64: ${{ secrets.APPLE_DISTRIBUTION_CERT_BASE64 }}+ p12-password: ${{ secrets.APPLE_DISTRIBUTION_CERT_PASSWORD }}++ - name: Archive and upload Cast to TestFlight+ working-directory: apple/apps/cast+ env:+ ASC_API_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}+ ASC_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}+ ASC_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}+ APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}+ BUILD_NUMBER: ${{ steps.metadata.outputs.build_number }}+ run: |+ key_path="${RUNNER_TEMP}/AuthKey_${ASC_KEY_ID}.p8"+ printf '%s' "${ASC_API_KEY_BASE64}" | base64 --decode > "${key_path}"++ xcodebuild archive \+ -project Cast.xcodeproj \+ -scheme Cast \+ -configuration Release \+ -destination 'generic/platform=tvOS' \+ -archivePath build/Cast.xcarchive \+ -allowProvisioningUpdates \+ -authenticationKeyPath "${key_path}" \+ -authenticationKeyID "${ASC_KEY_ID}" \+ -authenticationKeyIssuerID "${ASC_ISSUER_ID}" \+ CODE_SIGN_STYLE=Manual \+ CODE_SIGN_IDENTITY="Apple Distribution" \+ DEVELOPMENT_TEAM="${APPLE_TEAM_ID}" \+ PROVISIONING_PROFILE_SPECIFIER="Cast App Store" \+ CURRENT_PROJECT_VERSION="${BUILD_NUMBER}"++ xcodebuild -exportArchive \+ -archivePath build/Cast.xcarchive \+ -exportPath build/Export \+ -exportOptionsPlist scripts/ExportOptions-AppStore-CI.plist \+ -allowProvisioningUpdates \+ -authenticationKeyPath "${key_path}" \+ -authenticationKeyID "${ASC_KEY_ID}" \+ -authenticationKeyIssuerID "${ASC_ISSUER_ID}"diff --git a/apple/apps/cast/README.md b/apple/apps/cast/README.mdindex 8d9f67fe15..614d50058f 100644--- a/apple/apps/cast/README.md+++ b/apple/apps/cast/README.md@@ -20,3 +20,18 @@ Source code for the Ente Cast tvOS app.> The first build will install the Rust `nightly` toolchain and `rust-src`. They are needed for building Rust for tvOS targets.>> Re-run `cargo codegen native cast` whenever the UniFFI-exported surface of the cast crate (`rust/bindings/uniffi/cast`) changes.++## Releasing++Run `cast-build.yml` manually on `main` to archive and upload a TestFlight build.+Its build number is the committed Cast Release build number plus the GitHub+Actions run number.++For a release candidate, create `release/cast-v<version>` after setting the Cast+Release marketing version to `<version>`, then run the same workflow on that+branch. Release branches use the committed build number; increment it before+uploading another build for the same version.++Before the first release, create the `Cast App Store` provisioning profile for+`io.ente.frame.tv.cast`. The shared certificate and App Store Connect API-key+secrets are documented in [Apple signing](../../../.github/docs/apple-signing.md).diff --git a/apple/apps/cast/changes/README.md b/apple/apps/cast/changes/README.mdnew file mode 100644index 0000000000..d3047a4b90--- /dev/null+++ b/apple/apps/cast/changes/README.md@@ -0,0 +1,7 @@+For each user facing change, create a new `arbitrary-slug.md`, e.g.:++```md+- Added support for self-hosted Ente servers.+```++All these files are concatenated in alphabetical order for the release notes.diff --git a/apple/apps/cast/changes/post-quantum-pairing.md b/apple/apps/cast/changes/post-quantum-pairing.mdnew file mode 100644index 0000000000..406bf9b397--- /dev/null+++ b/apple/apps/cast/changes/post-quantum-pairing.md@@ -0,0 +1 @@+- Added post-quantum encryption to Cast pairing.diff --git a/apple/apps/cast/changes/self-hosted.md b/apple/apps/cast/changes/self-hosted.mdnew file mode 100644index 0000000000..58016f5d2c--- /dev/null+++ b/apple/apps/cast/changes/self-hosted.md@@ -0,0 +1 @@+- Added support for self-hosted Ente servers.diff --git a/apple/apps/cast/scripts/ExportOptions-AppStore-CI.plist b/apple/apps/cast/scripts/ExportOptions-AppStore-CI.plistnew file mode 100644index 0000000000..34ce132bdc--- /dev/null+++ b/apple/apps/cast/scripts/ExportOptions-AppStore-CI.plist@@ -0,0 +1,23 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+<dict>+ <key>destination</key>+ <string>upload</string>+ <key>manageAppVersionAndBuildNumber</key>+ <false/>+ <key>method</key>+ <string>app-store-connect</string>+ <key>provisioningProfiles</key>+ <dict>+ <key>io.ente.frame.tv.cast</key>+ <string>Cast App Store</string>+ </dict>+ <key>signingCertificate</key>+ <string>Apple Distribution</string>+ <key>signingStyle</key>+ <string>manual</string>+ <key>teamID</key>+ <string>6Z68YJY9Q2</string>+</dict>+</plist>