Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 2 additions & 1 deletion .buildkite/commands/build-tvos-app-store.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ echo "--- :closed_lock_with_key: Installing Secrets"
bundle exec fastlane run configure_apply

echo "--- :hammer_and_wrench: Building"
# The `0.` prefix keeps CI-driven builds lexicographically below any real release build code.
# The `0.` prefix keeps CI-driven builds below release build codes as builds may be
# rejected after a final release build already exists for the same version.
bundle exec fastlane build_app_store_connect_tvos "build_number:0.$BUILDKITE_BUILD_NUMBER"
5 changes: 4 additions & 1 deletion .buildkite/commands/release-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ RELEASE_VERSION="${1:?RELEASE_VERSION parameter missing}"
echo "--- :closed_lock_with_key: Installing Secrets"
bundle exec fastlane run configure_apply

echo "--- :hammer_and_wrench: Building"
echo "--- :hammer_and_wrench: Building iOS"
bundle exec fastlane build_app_store_connect

echo "--- :hammer_and_wrench: Building tvOS"
bundle exec fastlane build_app_store_connect_tvos
32 changes: 22 additions & 10 deletions .buildkite/commands/release-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,31 @@ install_gems
echo "--- :closed_lock_with_key: Installing Secrets"
bundle exec fastlane run configure_apply

echo "--- :testflight: Uploading to TestFlight"
echo "--- :testflight: Uploading iOS to TestFlight"
bundle exec fastlane upload_app_store_connect_build_to_testflight

echo "--- :arrow_up: Uploading dSYM to Sentry"
set +e
bundle exec fastlane symbols_upload
SENTRY_UPLOAD_STATUS=$?
set -e
echo "--- :testflight: Uploading tvOS to TestFlight"
bundle exec fastlane upload_app_store_connect_build_to_testflight_tvos

if [[ $SENTRY_UPLOAD_STATUS -ne 0 ]]; then
echo "^^^ +++ Failed to upload dSYM to Sentry! Make sure to download dSYM from the build step artifacts and upload manually."
buildkite-agent annotate --style error --context sentry-failure 'Failed to upload dSYM to Sentry! Make sure to download dSYM from the build step artifacts and upload manually.'
fi
upload_symbols() {
local platform="$1"
local dsym_path="$2"
local annotation_context="$3"

echo "--- :arrow_up: Uploading $platform dSYM to Sentry"
set +e
bundle exec fastlane symbols_upload "dsym_path:$dsym_path"
local sentry_upload_status=$?
set -e

if [[ $sentry_upload_status -ne 0 ]]; then
echo "^^^ +++ Failed to upload $platform dSYM to Sentry! Make sure to download dSYM from the build step artifacts and upload manually."
buildkite-agent annotate --style error --context "$annotation_context" "Failed to upload $platform dSYM to Sentry! Make sure to download dSYM from the build step artifacts and upload manually."
fi
}

upload_symbols "iOS" "$ARTIFACTS_DIR/pocket-casts.app.dSYM.zip" "sentry-failure-ios"
upload_symbols "tvOS" "$ARTIFACTS_DIR/pocket-casts-tvos.app.dSYM.zip" "sentry-failure-tvos"

echo "--- :github: Creating GitHub Release"
bundle exec fastlane create_release_on_github beta_release:"$BETA_RELEASE"
4 changes: 2 additions & 2 deletions .buildkite/release-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:

steps:

- label: "🛠 Release Build (App Store Connect)"
- label: "🛠 Release Builds (iOS + tvOS App Store Connect)"
key: testflight_build
command: .buildkite/commands/release-build.sh "${RELEASE_VERSION}"
priority: 1
Expand All @@ -23,7 +23,7 @@ steps:
notify:
- slack: "#build-and-ship"

- label: ":testflight: Release Upload (TestFlight, Sentry, GitHub)"
- label: ":testflight: Release Uploads (iOS + tvOS TestFlight, Sentry, GitHub)"
depends_on: testflight_build
command: .buildkite/commands/release-upload.sh "${RELEASE_VERSION}" "${BETA_RELEASE}"
priority: 1
Expand Down
3 changes: 0 additions & 3 deletions Pocket Casts TV App/Config/PocketCastsTV.base.xcconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#include "../../config/PocketCasts.base.xcconfig"

// tvOS tracks its own marketing version — still early-days, so we don't piggyback on the iOS `VERSION_SHORT` release automation.
MARKETING_VERSION = 0.1

SDKROOT = appletvos
TVOS_DEPLOYMENT_TARGET = 26.0
TARGETED_DEVICE_FAMILY = 3
Expand Down
69 changes: 48 additions & 21 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -420,12 +420,15 @@ platform :ios do
create_backmerge_pr
end

# Finalizes a release at the end of a sprint to submit to the App Store
# Finalizes release bookkeeping and triggers CI to upload final TestFlight builds.
#
# - Updates store metadata
# This lane does not submit builds to App Store Review. Submission remains a
# manual App Store Connect/Releases v2 step.
#
# - Refreshes and lints localized strings and App Store Connect metadata
# - Bumps final version number
# - Removes branch protection and close milestone
# - Triggers the final release on CI
# - Triggers final iOS and tvOS release builds/uploads on CI
#
# @param skip_confirm [Boolean] If true, avoids any interactive prompt (default: false)
#
Expand Down Expand Up @@ -838,14 +841,17 @@ platform :ios do
#
# @param beta_release [Boolean] If true, the GitHub Release is for a beta and will be marked as prerelease and published immediately.
# If false, the GitHub Release is for a final build and will not be marked as prerelease but will be created as Draft (to be manually published only once approved by Apple)
# @param archive_zip_path [String] Path to the `.xcarchive.zip` file to attach as an asset to the created GitHub Release
# @param archive_zip_path [String, nil] Optional path to a single `.xcarchive.zip` file to attach as an asset to the created GitHub Release.
# @param archive_zip_paths [Array<String>, nil] Optional paths to `.xcarchive.zip` files to attach as assets to the created GitHub Release.
#
lane :create_release_on_github do |beta_release: true, archive_zip_path: APP_STORE_CONNECT_XCARCHIVE_ZIP_PATH|
lane :create_release_on_github do |beta_release: true, archive_zip_path: nil, archive_zip_paths: nil|
require_env_vars!('GITHUB_TOKEN', 'SLACK_WEBHOOK')

app_version = release_version_current
build_version = build_code_current
version = beta_release ? build_version : app_version
upload_assets = Array(archive_zip_paths || [archive_zip_path].compact)
upload_assets = [APP_STORE_CONNECT_XCARCHIVE_ZIP_PATH, APP_STORE_CONNECT_TVOS_XCARCHIVE_ZIP_PATH] if upload_assets.empty?

@iangmaia iangmaia Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 16e3095.

changelog = extract_release_notes_for_version(
version: release_version_current,
Expand All @@ -861,7 +867,7 @@ platform :ios do
tag_name: version,
description: changelog,
commitish: Git.open(PROJECT_ROOT_FOLDER).log.first.sha,
upload_assets: [archive_zip_path.to_s],
upload_assets: upload_assets.map(&:to_s),
is_draft: !beta_release,
is_prerelease: beta_release
)
Expand Down Expand Up @@ -1132,22 +1138,18 @@ platform :ios do
# @param with_screenshots [Boolean] If true, will also upload the latest screenshot files to ASC (default: false)
#
lane :update_metadata_on_app_store_connect do |with_screenshots: false|
# Skip screenshots by default. The naming is "with" to make it clear that
# callers need to opt-in to adding screenshots. The naming of the deliver
# (upload_to_app_store) parameter, on the other hand, uses the skip verb.
skip_screenshots = with_screenshots == false
upload_metadata_to_app_store_connect(platform: 'ios', with_screenshots: with_screenshots)
end

upload_to_app_store(
app_identifier: APP_BUNDLE_IDENTIFIER_APP_STORE,
app_version: release_version_current,
skip_binary_upload: true,
screenshots_path: File.join(FASTLANE_FOLDER, 'screenshots'),
skip_screenshots: skip_screenshots,
overwrite_screenshots: true, # won't have effect if `skip_screenshots` is true
phased_release: true,
precheck_include_in_app_purchases: false,
api_key: app_store_connect_api_key
)
# Upload the localized tvOS metadata (from `fastlane/metadata/`) to App Store Connect.
#
# The tvOS app currently reuses iOS release notes and metadata. Screenshots stay opt-in;
# callers should only use `with_screenshots:true` once tvOS screenshots are present.
#
# @param with_screenshots [Boolean] If true, will also upload the latest screenshot files to ASC (default: false)
#
lane :update_metadata_on_app_store_connect_tvos do |with_screenshots: false|
upload_metadata_to_app_store_connect(platform: 'appletvos', with_screenshots: with_screenshots)
end

# Generates a HTML containing the libraries acknowledgments.
Expand Down Expand Up @@ -1313,6 +1315,31 @@ platform :ios do
end
end

# Upload localized App Store Connect metadata for a specific App Store platform.
#
# @param platform [String] Fastlane deliver platform, such as `ios` or `appletvos`
# @param with_screenshots [Boolean] If true, will also upload the latest screenshot files to ASC
#
def upload_metadata_to_app_store_connect(platform:, with_screenshots:)
# Skip screenshots by default. The naming is "with" to make it clear that
# callers need to opt-in to adding screenshots. The naming of the deliver
# (upload_to_app_store) parameter, on the other hand, uses the skip verb.
skip_screenshots = with_screenshots == false

upload_to_app_store(
app_identifier: APP_BUNDLE_IDENTIFIER_APP_STORE,
app_version: release_version_current,
platform: platform,
skip_binary_upload: true,
screenshots_path: File.join(FASTLANE_FOLDER, 'screenshots'),
skip_screenshots: skip_screenshots,
overwrite_screenshots: true, # won't have effect if `skip_screenshots` is true
phased_release: true,
precheck_include_in_app_purchases: false,
api_key: app_store_connect_api_key
)
end

# Update the milestone of still-open PRs
#
# - Update the milestone of all still-open PRs that were assigned the milestone of the version being code-frozen,
Expand Down
4 changes: 0 additions & 4 deletions podcasts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9961,7 +9961,6 @@
"@executable_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 0.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
SDKROOT = appletvos;
Expand Down Expand Up @@ -10014,7 +10013,6 @@
"@executable_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 0.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = appletvos;
Expand Down Expand Up @@ -10067,7 +10065,6 @@
"@executable_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 0.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = appletvos;
Expand Down Expand Up @@ -10120,7 +10117,6 @@
"@executable_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 0.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = appletvos;
Expand Down