Compare commits

..

3 Commits

Author SHA1 Message Date
b15473d24e ios: stamp release version into XcodeGen spec
All checks were successful
TestFlight / testflight (push) Successful in 1m43s
2026-06-26 01:29:54 -07:00
a512a65844 ios: accept release tag namespace in Fastfile
All checks were successful
TestFlight / testflight (push) Successful in 1m55s
2026-06-26 01:18:02 -07:00
207b44f67f ios: ci: actually release/ios/v*.
Some checks failed
TestFlight / testflight (push) Failing after 19s
2026-06-26 01:15:08 -07:00
3 changed files with 22 additions and 7 deletions

View File

@@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
tags:
- "release/v*"
- "release/ios/v*"
jobs:
testflight:

View File

@@ -24,7 +24,7 @@ targets:
GENERATE_INFOPLIST_FILE: YES
INFOPLIST_FILE: Apps/Sybil/Info.plist
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
MARKETING_VERSION: "1.10"
MARKETING_VERSION: "1.13.2"
CURRENT_PROJECT_VERSION: 11
INFOPLIST_KEY_CFBundleDisplayName: Sybil
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption: NO

View File

@@ -12,6 +12,7 @@ CI_KEYCHAIN_DB_PATH = File.expand_path("~/Library/Keychains/#{CI_KEYCHAIN_NAME}-
IOS_ROOT = File.expand_path("..", __dir__)
PROJECT_FILE = File.join(IOS_ROOT, "Sybil.xcodeproj")
PROJECT_SPEC = File.join(IOS_ROOT, "project.yml")
APP_PROJECT_SPEC = File.join(IOS_ROOT, "Apps/Sybil/project.yml")
def present?(value)
!value.to_s.strip.empty?
@@ -24,14 +25,15 @@ end
def release_version
tag = ENV["SYBIL_VERSION_TAG"]
tag = ENV["GITHUB_REF_NAME"] if !present?(tag)
tag = ENV["GITHUB_REF"].to_s.sub(%r{\Arefs/tags/}, "") if !present?(tag)
tag = sh("git describe --tags --abbrev=0").strip if !present?(tag)
version = tag.to_s.sub(%r{\Arelease/}, "").sub(/\Av/, "")
match = tag.to_s.match(%r{\Arelease/ios/v(\d+\.\d+\.\d+)\z})
unless version.match?(/\A\d+\.\d+\.\d+\z/)
UI.user_error!("Release tag must look like v1.2.3; got #{tag.inspect}")
unless match
UI.user_error!("Release tag must look like release/ios/v1.2.3; got #{tag.inspect}")
end
version
match[1]
end
# App Store Connect requires CFBundleVersion to be unique and strictly
@@ -48,6 +50,17 @@ def build_number
value.to_i
end
def stamp_marketing_version(version)
contents = File.read(APP_PROJECT_SPEC)
updated = contents.sub(/^(\s*MARKETING_VERSION:\s*).*/, "\\1\"#{version}\"")
if updated == contents
UI.user_error!("Could not find MARKETING_VERSION in #{APP_PROJECT_SPEC}")
end
File.write(APP_PROJECT_SPEC, updated)
end
platform :ios do
private_lane :app_store_api_key do
app_store_connect_api_key(
@@ -103,9 +116,11 @@ platform :ios do
api_key = app_store_api_key
version = release_version
stamp_marketing_version(version)
sh("xcodegen", "--spec", PROJECT_SPEC)
increment_version_number(version_number: release_version, xcodeproj: PROJECT_FILE)
increment_version_number(version_number: version, xcodeproj: PROJECT_FILE)
increment_build_number(build_number: build_number, xcodeproj: PROJECT_FILE)
sync_signing(api_key: api_key, readonly: true)