Integrate with Fastline, Create a release script

This commit is contained in:
Mo Tarbin
2026-07-14 12:16:36 -04:00
parent 7f68f7dd9d
commit eacfca715c
13 changed files with 726 additions and 197 deletions

4
fastlane/Appfile Normal file
View File

@@ -0,0 +1,4 @@
app_identifier("com.donetick.app")
team_id("6UJJ78R3BS")
apple_id(ENV["APPLE_ID"]) if ENV["APPLE_ID"]

66
fastlane/Fastfile Normal file
View File

@@ -0,0 +1,66 @@
require "shellwords"
default_platform(:ios)
IOS_KEY_PATH = File.expand_path("../ios/AuthKey_84F695CDQ3.p8")
IOS_OUTPUT_DIR = File.expand_path("../build/ios")
ANDROID_PROJECT_DIR = File.expand_path("../android")
platform :ios do
desc "Build a signed, App Store-ready .ipa"
lane :release do
Dir.chdir(File.expand_path("../ios/App")) do
Bundler.with_clean_env do
sh("pod install --repo-update")
end
end
build_app(
workspace: "ios/App/App.xcworkspace",
scheme: "App",
export_method: "app-store",
output_directory: IOS_OUTPUT_DIR,
output_name: "Donetick.ipa",
export_options: {
signingStyle: "manual",
provisioningProfiles: {
"com.donetick.app" => "Donetick App Store(fastline)",
},
},
)
UI.success("Signed .ipa at #{IOS_OUTPUT_DIR}/Donetick.ipa")
end
end
platform :android do
desc "Build a signed release .aab"
lane :release do
keystore_properties = File.join(ANDROID_PROJECT_DIR, "keystore.properties")
UI.user_error!("Missing #{keystore_properties} — run scripts/pull-secrets.sh first") unless File.exist?(keystore_properties)
gradle(
task: "bundle",
build_type: "Release",
project_dir: "#{ANDROID_PROJECT_DIR}/",
)
aab_path = lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH]
UI.success("Signed .aab at #{aab_path}")
end
desc "Build a signed release .apk (for sideloading/testing)"
lane :apk do
keystore_properties = File.join(ANDROID_PROJECT_DIR, "keystore.properties")
UI.user_error!("Missing #{keystore_properties} — run scripts/pull-secrets.sh first") unless File.exist?(keystore_properties)
gradle(
task: "assemble",
build_type: "Release",
project_dir: "#{ANDROID_PROJECT_DIR}/",
)
apk_path = lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]
UI.success("Signed .apk at #{apk_path}")
end
end

53
fastlane/README.md Normal file
View File

@@ -0,0 +1,53 @@
fastlane documentation
----
# Installation
Make sure you have the latest version of the Xcode command line tools installed:
```sh
xcode-select --install
```
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
# Available Actions
## iOS
### ios release
```sh
[bundle exec] fastlane ios release
```
Build a signed, App Store-ready .ipa
----
## Android
### android release
```sh
[bundle exec] fastlane android release
```
Build a signed release .aab
### android apk
```sh
[bundle exec] fastlane android apk
```
Build a signed release .apk (for sideloading/testing)
----
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).