From c88e8412038da3a85e3a80591d68fba412d6ce98 Mon Sep 17 00:00:00 2001 From: Michael Rittmeister Date: Tue, 17 Oct 2023 14:26:19 +0200 Subject: [PATCH] Final touches for Apple CI - Enable only on git tags - Bump version and build number correcly --- .github/workflows/ci.yml | 2 +- app/ios/fastlane/Fastfile | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d5bb83..c081114 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -248,7 +248,7 @@ jobs: build_ios_app: name: Deploy to test flight runs-on: macos-latest - #if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') steps: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 diff --git a/app/ios/fastlane/Fastfile b/app/ios/fastlane/Fastfile index b4735ea..d4521f5 100644 --- a/app/ios/fastlane/Fastfile +++ b/app/ios/fastlane/Fastfile @@ -9,6 +9,8 @@ APPLE_ISSUER_ID = ENV["APPLE_ISSUER_ID"] APPLE_KEY_ID = ENV["APPLE_KEY_ID"] APPLE_KEY_CONTENT = ENV["APPLE_KEY_CONTENT"] GIT_AUTHORIZATION = ENV["GIT_AUTHORIZATION"] +VERSION = ENV["GITHUB_REF_NAME"] +BUILD_NUMBER = ENV["GITHUB_RUN_NUMBER"] def delete_temp_keychain(name) delete_keychain( @@ -44,7 +46,15 @@ platform :ios do in_house: false ) - increment_build_number(xcodeproj: "iosApp.xcodeproj") + increment_build_number( + build_number: "#{BUILD_NUMER}", + xcodeproj: "iosApp.xcodeproj" + ) + + increment_version_number( + version_number: "#{VERSION}", + xcodeproj: "iosApp.xcodeproj" + ) cocoapods( clean_install: true