From a45e82ad4913da3370a30ada2896fc94182b4797 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 16:23:36 +0900 Subject: [PATCH 01/29] chore: auto upload to testflight --- .github/cd.yaml | 81 ++++++++++++++++++++++++++++++++++++++++++++++ fastlane/Fastfile | 22 +++++++++++-- fastlane/README.md | 8 +++++ 3 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 .github/cd.yaml diff --git a/.github/cd.yaml b/.github/cd.yaml new file mode 100644 index 00000000..e357ae5a --- /dev/null +++ b/.github/cd.yaml @@ -0,0 +1,81 @@ +name: Siksha-CD + +on: + push: + tags: + - testflight/v[0-9]+.[0-9]+.[0-9]+-*.[0-9]+ + - appstore/v[0-9]+.[0-9]+.[0-9]+-*.[0-9]+ + +jobs: + deploy: + name: Execute fastlane for testflight / appstore + + env: + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + SSH_KEY: ${{ secrets.SSH_KEY }} + APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} + APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} + APP_STORE_CONNECT_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_KEY_CONTENT }} + SLACK_URL: ${{ secrets.SLACK_WEBHOOK }} + GIT_TAG_NAME: ${{ github.ref_name }} + XCODE_VERSION: "16.2" + + runs-on: macos-15 + + steps: + - name: Parse tag name + uses: actions-ecosystem/action-regex-match@v2 + id: regex + with: + text: ${{ github.ref_name }} + regex: '^(testflight|appstore)\/v(\d+)\.(\d+)\.(\d+)-(release|debug)\.(\d+)$' + + - if: ${{ steps.regex.outputs.group1 == 'appstore' && steps.regex.outputs.group5 == 'debug' }} + run: | + echo "you can't upload debug build to appstore!" + exit 1 + + - uses: actions/checkout@v3 + + - run: | + sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app/Contents/Developer + ls + + - name: Set version number and build number + run: | + echo "VERSION_NUMBER=${{ steps.regex.outputs.group2 }}.${{ steps.regex.outputs.group3 }}.${{ steps.regex.outputs.group4 }}" >> $GITHUB_ENV + echo "BUILD_NUMBER=${{ steps.regex.outputs.group6 }}" >> $GITHUB_ENV + + - name: Install Ruby Dependencies + run: | + bundle install + bundle update fastlane + + - name: Setup match repo ssh + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_KEY }} + known_hosts: ${{ secrets.KNOWN_HOSTS }} + + + + - name: Inject secret file dependencies + env: + BUNDLE: ${{ secrets.BUNDLE }} + BUNDLE_DEV: ${{secrets.BUNDLE_DEV}} + CONFIG: ${{ secrets.CONFIG }} + GOOGLE_SERVICE_INFO: ${{ secrets.GOOGLE_SERVICE_INFO }} + GOOGLE_SERVICE_INFO_DEV: ${{ secrets.GOOGLE_SERVICE_INFO_DEV }} + run: | + echo "$BUNDLE" > Siksha/Supporting Files/bundle.xcconfig + echo "$BUNDLE_DEV" > Siksha/Supporting Files/bundle-dev.xcconfig + echo "$CONFIG" > Siksha/Supporting Files/config.plist + echo "$GOOGLE_SERVICE_INFO" > Siksha/Supporting Files/GoogleService-Info.plist + echo "$GOOGLE_SERVICE_INFO_DEV" > Siksha/Supporting Files/GoogleService-Info-dev.xcconfig + + + - name: Upload prod app to TestFlight + if: ${{ steps.regex.outputs.group1 == 'testflight' && steps.regex.outputs.group5 == 'release' }} + run: | + bundle exec fastlane beta --env prod + diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 381783f9..3fbb894e 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -16,10 +16,28 @@ default_platform(:ios) platform :ios do - desc "Description of what the lane does" - lane :custom_lane do + desc "Upload app to testflight" + lane :beta do + setup_ci + match( + git_url:"https://github.com/wafflestudio/siksha-ios-private", + storage_mode: "git", + type: "appstore", + readonly: true + ) + app_store_connect_api_key( + key_id:ENV["APPSTORE_CONNECT_KEY_ID"], + issuer_id:ENV["APPSTORE_CONNECT_ISSUER_ID"], + key_content:ENV["APPSTORE_CONNECT_KEY_CONTENT"] + ) + + increment_build_number(build_number:ENV["BUILD_NUMBER"],xcodeproj:"Siksha.xcodeproj") + increment_version_number(version_number:ENV["VERSION_NUMBER"],xcodeproj:"Siksha.xcodeproj") + upload_to_testflight(app_version:ENV["VERSION_NUMBER"]) + slack(message:"uploaded to testflight") # add actions here: https://docs.fastlane.tools/actions end + end lane :register_new_devices do diff --git a/fastlane/README.md b/fastlane/README.md index 5749fd80..d465cd5f 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -21,6 +21,14 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do +### beta + +```sh +[bundle exec] fastlane beta +``` + + + ---- From 9efa65068aec40caec12d06877a980fcde7ce293 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 16:27:29 +0900 Subject: [PATCH 02/29] fix: change location of github action yaml file --- .github/{ => workflows}/cd.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/cd.yaml (100%) diff --git a/.github/cd.yaml b/.github/workflows/cd.yaml similarity index 100% rename from .github/cd.yaml rename to .github/workflows/cd.yaml From 32e9bfd331bdc6a68363a8780fa2cedb18a0d435 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 16:45:38 +0900 Subject: [PATCH 03/29] fix: remove unnecessary information for fastfile --- fastlane/Fastfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 3fbb894e..4a7098b9 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -20,8 +20,6 @@ platform :ios do lane :beta do setup_ci match( - git_url:"https://github.com/wafflestudio/siksha-ios-private", - storage_mode: "git", type: "appstore", readonly: true ) From 48a89d5d98e5f810a6d1f13e19207642576ca874 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 16:53:15 +0900 Subject: [PATCH 04/29] fix: add bundle identifier for fastlane --- .github/workflows/cd.yaml | 1 + fastlane/Fastfile | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index e357ae5a..ae904f4c 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -18,6 +18,7 @@ jobs: APP_STORE_CONNECT_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_KEY_CONTENT }} SLACK_URL: ${{ secrets.SLACK_WEBHOOK }} GIT_TAG_NAME: ${{ github.ref_name }} + BUNDLE_IDENTIFIER: ${{ github.BUNDLE_IDENTIFIER }} XCODE_VERSION: "16.2" runs-on: macos-15 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 4a7098b9..84103128 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -20,7 +20,8 @@ platform :ios do lane :beta do setup_ci match( - type: "appstore", + type: "appstore", + app_identifier:ENV["BUNDLE_IDENTIFIER"] readonly: true ) app_store_connect_api_key( From 8d998c46d11cae5691225eaba8460a1a326cd348 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 16:56:38 +0900 Subject: [PATCH 05/29] fix: fastlane syntax fix --- fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 84103128..79b18da3 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -21,7 +21,7 @@ platform :ios do setup_ci match( type: "appstore", - app_identifier:ENV["BUNDLE_IDENTIFIER"] + app_identifier:ENV["BUNDLE_IDENTIFIER"], readonly: true ) app_store_connect_api_key( From fa20b749928f0dee5e1890b71a538a9072785324 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 17:02:22 +0900 Subject: [PATCH 06/29] fix: fix secret names in cd yaml --- .github/workflows/cd.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index ae904f4c..c2b10082 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -13,9 +13,9 @@ jobs: env: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} SSH_KEY: ${{ secrets.SSH_KEY }} - APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} - APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} - APP_STORE_CONNECT_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_KEY_CONTENT }} + APPSTORE_CONNECT_KEY_ID: ${{ secrets.APPSTORE_CONNECT_KEY_ID }} + APPSTORE_CONNECT_ISSUER_ID: ${{ secrets.APPSTORE_CONNECT_ISSUER_ID }} + APPSTORE_CONNECT_KEY_CONTENT: ${{ secrets.APPSTORE_CONNECT_KEY_CONTENT }} SLACK_URL: ${{ secrets.SLACK_WEBHOOK }} GIT_TAG_NAME: ${{ github.ref_name }} BUNDLE_IDENTIFIER: ${{ github.BUNDLE_IDENTIFIER }} From 8dce5880cae60dfddedbfdbfd02affe7721d0ac3 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 17:11:24 +0900 Subject: [PATCH 07/29] fix: add build app to fastfile --- fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 79b18da3..6a38fe74 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -29,7 +29,7 @@ platform :ios do issuer_id:ENV["APPSTORE_CONNECT_ISSUER_ID"], key_content:ENV["APPSTORE_CONNECT_KEY_CONTENT"] ) - + build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Release",clean:true, silent:true) increment_build_number(build_number:ENV["BUILD_NUMBER"],xcodeproj:"Siksha.xcodeproj") increment_version_number(version_number:ENV["VERSION_NUMBER"],xcodeproj:"Siksha.xcodeproj") upload_to_testflight(app_version:ENV["VERSION_NUMBER"]) From 376d99dc08b2184084f8e83371551a297b7d552e Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 17:26:57 +0900 Subject: [PATCH 08/29] fix: add cd yaml file supporting files folder creation --- .github/workflows/cd.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index c2b10082..b12d9617 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -68,6 +68,7 @@ jobs: GOOGLE_SERVICE_INFO: ${{ secrets.GOOGLE_SERVICE_INFO }} GOOGLE_SERVICE_INFO_DEV: ${{ secrets.GOOGLE_SERVICE_INFO_DEV }} run: | + mkdir "Siksha/Supporting Files" echo "$BUNDLE" > Siksha/Supporting Files/bundle.xcconfig echo "$BUNDLE_DEV" > Siksha/Supporting Files/bundle-dev.xcconfig echo "$CONFIG" > Siksha/Supporting Files/config.plist From 77e922a29535955f6f66ec3cfecd4b373b821e05 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 17:34:45 +0900 Subject: [PATCH 09/29] extend timeout for fastfile --- fastlane/Fastfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 6a38fe74..5900ecf6 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -18,6 +18,7 @@ default_platform(:ios) platform :ios do desc "Upload app to testflight" lane :beta do + ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "120" setup_ci match( type: "appstore", @@ -43,4 +44,4 @@ lane :register_new_devices do register_devices( devices_file: "./devices.txt" ) -end \ No newline at end of file +end From 483553670bdd087870172d90798fb122a2204866 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 17:44:35 +0900 Subject: [PATCH 10/29] fix: fix cd yaml --- .github/workflows/cd.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index b12d9617..a67287ba 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -69,11 +69,11 @@ jobs: GOOGLE_SERVICE_INFO_DEV: ${{ secrets.GOOGLE_SERVICE_INFO_DEV }} run: | mkdir "Siksha/Supporting Files" - echo "$BUNDLE" > Siksha/Supporting Files/bundle.xcconfig - echo "$BUNDLE_DEV" > Siksha/Supporting Files/bundle-dev.xcconfig - echo "$CONFIG" > Siksha/Supporting Files/config.plist - echo "$GOOGLE_SERVICE_INFO" > Siksha/Supporting Files/GoogleService-Info.plist - echo "$GOOGLE_SERVICE_INFO_DEV" > Siksha/Supporting Files/GoogleService-Info-dev.xcconfig + echo "$BUNDLE" > "Siksha/Supporting Files/bundle.xcconfig" + echo "$BUNDLE_DEV" > "Siksha/Supporting Files/bundle-dev.xcconfig" + echo "$CONFIG" > "Siksha/Supporting Files/config.plist" + echo "$GOOGLE_SERVICE_INFO" > "Siksha/Supporting Files/GoogleService-Info.plist" + echo "$GOOGLE_SERVICE_INFO_DEV" > "Siksha/Supporting Files/GoogleService-Info-dev.xcconfig" - name: Upload prod app to TestFlight From f357b1d4ea3731eb5860639f2847c9ee89ee2aea Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 18:16:36 +0900 Subject: [PATCH 11/29] fix: fix fastlane code sign settings --- fastlane/Fastfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 5900ecf6..27ef559e 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -18,7 +18,6 @@ default_platform(:ios) platform :ios do desc "Upload app to testflight" lane :beta do - ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "120" setup_ci match( type: "appstore", @@ -30,6 +29,10 @@ platform :ios do issuer_id:ENV["APPSTORE_CONNECT_ISSUER_ID"], key_content:ENV["APPSTORE_CONNECT_KEY_CONTENT"] ) + update_code_signing_settings( + use_automatic_signing: false, + code_sign_identity: "iPhone Distribution" + ) build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Release",clean:true, silent:true) increment_build_number(build_number:ENV["BUILD_NUMBER"],xcodeproj:"Siksha.xcodeproj") increment_version_number(version_number:ENV["VERSION_NUMBER"],xcodeproj:"Siksha.xcodeproj") @@ -44,4 +47,4 @@ lane :register_new_devices do register_devices( devices_file: "./devices.txt" ) -end +end \ No newline at end of file From 461fce04ffac101c16c5e2ac476dea16e9e0f0ab Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 18:21:44 +0900 Subject: [PATCH 12/29] fix: fix timeout --- fastlane/Fastfile | 1 + 1 file changed, 1 insertion(+) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 27ef559e..cf351f17 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -18,6 +18,7 @@ default_platform(:ios) platform :ios do desc "Upload app to testflight" lane :beta do + ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "120" setup_ci match( type: "appstore", From 754ca064f66de7ddfae832e88834ade99f54132a Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 18:33:36 +0900 Subject: [PATCH 13/29] fix: provide profile name --- .github/workflows/cd.yaml | 1 + fastlane/Fastfile | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index a67287ba..d9c23eb8 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -16,6 +16,7 @@ jobs: APPSTORE_CONNECT_KEY_ID: ${{ secrets.APPSTORE_CONNECT_KEY_ID }} APPSTORE_CONNECT_ISSUER_ID: ${{ secrets.APPSTORE_CONNECT_ISSUER_ID }} APPSTORE_CONNECT_KEY_CONTENT: ${{ secrets.APPSTORE_CONNECT_KEY_CONTENT }} + PROFILE_NAME: ${{ secrets.PROFILE_NAME }} SLACK_URL: ${{ secrets.SLACK_WEBHOOK }} GIT_TAG_NAME: ${{ github.ref_name }} BUNDLE_IDENTIFIER: ${{ github.BUNDLE_IDENTIFIER }} diff --git a/fastlane/Fastfile b/fastlane/Fastfile index cf351f17..c5a01b2c 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -32,7 +32,8 @@ platform :ios do ) update_code_signing_settings( use_automatic_signing: false, - code_sign_identity: "iPhone Distribution" + code_sign_identity: "iPhone Distribution", + profile_name:ENV["PROFILE_NAME"] ) build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Release",clean:true, silent:true) increment_build_number(build_number:ENV["BUILD_NUMBER"],xcodeproj:"Siksha.xcodeproj") From 080b5b0e50815adc61a9058936acdfa4fb43bd67 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 18:59:05 +0900 Subject: [PATCH 14/29] fix: fix fastlane code signing update --- .github/workflows/cd.yaml | 1 + fastlane/Fastfile | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index d9c23eb8..39587867 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -17,6 +17,7 @@ jobs: APPSTORE_CONNECT_ISSUER_ID: ${{ secrets.APPSTORE_CONNECT_ISSUER_ID }} APPSTORE_CONNECT_KEY_CONTENT: ${{ secrets.APPSTORE_CONNECT_KEY_CONTENT }} PROFILE_NAME: ${{ secrets.PROFILE_NAME }} + TEAM_ID: ${{ secrets.TEAM_ID }} SLACK_URL: ${{ secrets.SLACK_WEBHOOK }} GIT_TAG_NAME: ${{ github.ref_name }} BUNDLE_IDENTIFIER: ${{ github.BUNDLE_IDENTIFIER }} diff --git a/fastlane/Fastfile b/fastlane/Fastfile index c5a01b2c..676e34a2 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -33,7 +33,11 @@ platform :ios do update_code_signing_settings( use_automatic_signing: false, code_sign_identity: "iPhone Distribution", - profile_name:ENV["PROFILE_NAME"] + profile_name:ENV["PROFILE_NAME"], + path:"Siksha.xcodeproj", + bundle_identifier:ENV["BUNDLE_IDENTIFIER"], + targets:"Siksha-Release", + team_id:ENV["TEAM_ID"] ) build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Release",clean:true, silent:true) increment_build_number(build_number:ENV["BUILD_NUMBER"],xcodeproj:"Siksha.xcodeproj") From fffe93c1cbd71c63d048fdc4da6405196f79cdb3 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 19:15:25 +0900 Subject: [PATCH 15/29] fix: fix fastfile --- fastlane/Fastfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 676e34a2..f7bbf904 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -39,7 +39,14 @@ platform :ios do targets:"Siksha-Release", team_id:ENV["TEAM_ID"] ) - build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Release",clean:true, silent:true) + build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Release",clean:true, silent:true, + export_options: { + method: "app-store", + signingStyle: "manual", + provisioningProfiles: { + ENV["BUILD_IDENTIFIER"] => ENV["PROFILE_NAME"] + } + }) increment_build_number(build_number:ENV["BUILD_NUMBER"],xcodeproj:"Siksha.xcodeproj") increment_version_number(version_number:ENV["VERSION_NUMBER"],xcodeproj:"Siksha.xcodeproj") upload_to_testflight(app_version:ENV["VERSION_NUMBER"]) From 6b5c3b4ab1385aa11bd963dcc4e349d730c71207 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 19:38:33 +0900 Subject: [PATCH 16/29] Revert "fix: fix fastlane code signing update" This reverts commit 080b5b0e50815adc61a9058936acdfa4fb43bd67. --- .github/workflows/cd.yaml | 1 - fastlane/Fastfile | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 39587867..d9c23eb8 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -17,7 +17,6 @@ jobs: APPSTORE_CONNECT_ISSUER_ID: ${{ secrets.APPSTORE_CONNECT_ISSUER_ID }} APPSTORE_CONNECT_KEY_CONTENT: ${{ secrets.APPSTORE_CONNECT_KEY_CONTENT }} PROFILE_NAME: ${{ secrets.PROFILE_NAME }} - TEAM_ID: ${{ secrets.TEAM_ID }} SLACK_URL: ${{ secrets.SLACK_WEBHOOK }} GIT_TAG_NAME: ${{ github.ref_name }} BUNDLE_IDENTIFIER: ${{ github.BUNDLE_IDENTIFIER }} diff --git a/fastlane/Fastfile b/fastlane/Fastfile index f7bbf904..7994b963 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -33,11 +33,7 @@ platform :ios do update_code_signing_settings( use_automatic_signing: false, code_sign_identity: "iPhone Distribution", - profile_name:ENV["PROFILE_NAME"], - path:"Siksha.xcodeproj", - bundle_identifier:ENV["BUNDLE_IDENTIFIER"], - targets:"Siksha-Release", - team_id:ENV["TEAM_ID"] + profile_name:ENV["PROFILE_NAME"] ) build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Release",clean:true, silent:true, export_options: { From 2b7333acdde921545e61ea27ecdc6b399fe1a61d Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 19:46:26 +0900 Subject: [PATCH 17/29] fix: revert fastfile and cd yaml --- .github/workflows/cd.yaml | 1 + fastlane/Fastfile | 15 ++++++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index d9c23eb8..39587867 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -17,6 +17,7 @@ jobs: APPSTORE_CONNECT_ISSUER_ID: ${{ secrets.APPSTORE_CONNECT_ISSUER_ID }} APPSTORE_CONNECT_KEY_CONTENT: ${{ secrets.APPSTORE_CONNECT_KEY_CONTENT }} PROFILE_NAME: ${{ secrets.PROFILE_NAME }} + TEAM_ID: ${{ secrets.TEAM_ID }} SLACK_URL: ${{ secrets.SLACK_WEBHOOK }} GIT_TAG_NAME: ${{ github.ref_name }} BUNDLE_IDENTIFIER: ${{ github.BUNDLE_IDENTIFIER }} diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 7994b963..676e34a2 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -33,16 +33,13 @@ platform :ios do update_code_signing_settings( use_automatic_signing: false, code_sign_identity: "iPhone Distribution", - profile_name:ENV["PROFILE_NAME"] + profile_name:ENV["PROFILE_NAME"], + path:"Siksha.xcodeproj", + bundle_identifier:ENV["BUNDLE_IDENTIFIER"], + targets:"Siksha-Release", + team_id:ENV["TEAM_ID"] ) - build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Release",clean:true, silent:true, - export_options: { - method: "app-store", - signingStyle: "manual", - provisioningProfiles: { - ENV["BUILD_IDENTIFIER"] => ENV["PROFILE_NAME"] - } - }) + build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Release",clean:true, silent:true) increment_build_number(build_number:ENV["BUILD_NUMBER"],xcodeproj:"Siksha.xcodeproj") increment_version_number(version_number:ENV["VERSION_NUMBER"],xcodeproj:"Siksha.xcodeproj") upload_to_testflight(app_version:ENV["VERSION_NUMBER"]) From e70859f793830b1d3700a505365746e7c84162e8 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 19:54:44 +0900 Subject: [PATCH 18/29] fix: fix profile type --- fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 676e34a2..1d1e1dbe 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -32,7 +32,7 @@ platform :ios do ) update_code_signing_settings( use_automatic_signing: false, - code_sign_identity: "iPhone Distribution", + code_sign_identity: "Apple Distribution", profile_name:ENV["PROFILE_NAME"], path:"Siksha.xcodeproj", bundle_identifier:ENV["BUNDLE_IDENTIFIER"], From cc4af8363f60afebd1a7ec4ab76cd0521a4ad639 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 21:08:11 +0900 Subject: [PATCH 19/29] Update Fastfile --- fastlane/Fastfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 1d1e1dbe..c1bbca12 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -23,7 +23,8 @@ platform :ios do match( type: "appstore", app_identifier:ENV["BUNDLE_IDENTIFIER"], - readonly: true + readonly: true, + force: true ) app_store_connect_api_key( key_id:ENV["APPSTORE_CONNECT_KEY_ID"], @@ -53,4 +54,4 @@ lane :register_new_devices do register_devices( devices_file: "./devices.txt" ) -end \ No newline at end of file +end From 3724d3a2688880578f626ba2ac596f1e7827980c Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 12 Jul 2025 21:13:11 +0900 Subject: [PATCH 20/29] Update Fastfile --- fastlane/Fastfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index c1bbca12..5099a50f 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -24,7 +24,9 @@ platform :ios do type: "appstore", app_identifier:ENV["BUNDLE_IDENTIFIER"], readonly: true, - force: true + force: true, + verbose: true + ) app_store_connect_api_key( key_id:ENV["APPSTORE_CONNECT_KEY_ID"], From c9007e6da699330b54c6bd90e51e2d3b06f93377 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 2 Aug 2025 00:23:14 +0900 Subject: [PATCH 21/29] fix: get connect api before match --- fastlane/Fastfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 5099a50f..3296dffb 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -20,6 +20,12 @@ platform :ios do lane :beta do ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "120" setup_ci + app_store_connect_api_key( + key_id:ENV["APPSTORE_CONNECT_KEY_ID"], + issuer_id:ENV["APPSTORE_CONNECT_ISSUER_ID"], + key_content:ENV["APPSTORE_CONNECT_KEY_CONTENT"] + ) + match( type: "appstore", app_identifier:ENV["BUNDLE_IDENTIFIER"], @@ -28,11 +34,7 @@ platform :ios do verbose: true ) - app_store_connect_api_key( - key_id:ENV["APPSTORE_CONNECT_KEY_ID"], - issuer_id:ENV["APPSTORE_CONNECT_ISSUER_ID"], - key_content:ENV["APPSTORE_CONNECT_KEY_CONTENT"] - ) + update_code_signing_settings( use_automatic_signing: false, code_sign_identity: "Apple Distribution", From f59c94d1adb99dde1613424a05d292e7eb2a0594 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 2 Aug 2025 00:34:31 +0900 Subject: [PATCH 22/29] fix: fix cd yaml --- .github/workflows/cd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 39587867..0cc9bd86 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -20,7 +20,7 @@ jobs: TEAM_ID: ${{ secrets.TEAM_ID }} SLACK_URL: ${{ secrets.SLACK_WEBHOOK }} GIT_TAG_NAME: ${{ github.ref_name }} - BUNDLE_IDENTIFIER: ${{ github.BUNDLE_IDENTIFIER }} + BUNDLE_IDENTIFIER: ${{ secrets.BUNDLE_IDENTIFIER }} XCODE_VERSION: "16.2" runs-on: macos-15 From e02ace417353e3053aec98e2fb504b63837d4c4f Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 2 Aug 2025 22:07:35 +0900 Subject: [PATCH 23/29] fix: remove match force and verbose --- fastlane/Fastfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 3296dffb..0929d1b4 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -29,10 +29,7 @@ platform :ios do match( type: "appstore", app_identifier:ENV["BUNDLE_IDENTIFIER"], - readonly: true, - force: true, - verbose: true - + readonly: true ) update_code_signing_settings( From 19cc22614ab1603141b0d323cbddbb66aeaa7847 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 2 Aug 2025 22:19:04 +0900 Subject: [PATCH 24/29] feat: add debug release fastlane line --- .github/workflows/cd.yaml | 6 ++++-- fastlane/Fastfile | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 0cc9bd86..8e1fec24 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -81,5 +81,7 @@ jobs: - name: Upload prod app to TestFlight if: ${{ steps.regex.outputs.group1 == 'testflight' && steps.regex.outputs.group5 == 'release' }} run: | - bundle exec fastlane beta --env prod - + bundle exec fastlane beta + if: ${{ steps.regex.outputs.group1 == 'testflight' && steps.regex.outputs.group5 == 'debug' }} + run: | + bundle exec fastlane beta_debug diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 0929d1b4..c4226cc0 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -41,7 +41,38 @@ platform :ios do targets:"Siksha-Release", team_id:ENV["TEAM_ID"] ) - build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Release",clean:true, silent:true) + build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Release",configuration:"Release",clean:true, silent:true) + increment_build_number(build_number:ENV["BUILD_NUMBER"],xcodeproj:"Siksha.xcodeproj") + increment_version_number(version_number:ENV["VERSION_NUMBER"],xcodeproj:"Siksha.xcodeproj") + upload_to_testflight(app_version:ENV["VERSION_NUMBER"]) + slack(message:"uploaded to testflight") + # add actions here: https://docs.fastlane.tools/actions + end + lane :beta_debug do + ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "120" + setup_ci + app_store_connect_api_key( + key_id:ENV["APPSTORE_CONNECT_KEY_ID"], + issuer_id:ENV["APPSTORE_CONNECT_ISSUER_ID"], + key_content:ENV["APPSTORE_CONNECT_KEY_CONTENT"] + ) + + match( + type: "appstore", + app_identifier:ENV["BUNDLE_IDENTIFIER_DEV"], + readonly: true + ) + + update_code_signing_settings( + use_automatic_signing: false, + code_sign_identity: "Apple Distribution", + profile_name:ENV["PROFILE_NAME"], + path:"Siksha.xcodeproj", + bundle_identifier:ENV["BUNDLE_IDENTIFIER_DEV"], + targets:"Siksha-Debug", + team_id:ENV["TEAM_ID"] + ) + build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Debug",configuration:"Debug",clean:true, silent:true) increment_build_number(build_number:ENV["BUILD_NUMBER"],xcodeproj:"Siksha.xcodeproj") increment_version_number(version_number:ENV["VERSION_NUMBER"],xcodeproj:"Siksha.xcodeproj") upload_to_testflight(app_version:ENV["VERSION_NUMBER"]) From 39ccb36081efa5cc4e39c6117dc35bb6b1f3605b Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 2 Aug 2025 22:25:20 +0900 Subject: [PATCH 25/29] fix: fix cd yaml file --- .github/workflows/cd.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 8e1fec24..3a1472a2 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -82,6 +82,7 @@ jobs: if: ${{ steps.regex.outputs.group1 == 'testflight' && steps.regex.outputs.group5 == 'release' }} run: | bundle exec fastlane beta + - name: Upload dev app to TestFlight if: ${{ steps.regex.outputs.group1 == 'testflight' && steps.regex.outputs.group5 == 'debug' }} run: | bundle exec fastlane beta_debug From 7416a1f850f25ff5b7874cbb6913e0c8dec5ad73 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 2 Aug 2025 22:28:53 +0900 Subject: [PATCH 26/29] fix: add bundle identifier dev secret to cd yaml --- .github/workflows/cd.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 3a1472a2..bfe2a6ce 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -21,6 +21,7 @@ jobs: SLACK_URL: ${{ secrets.SLACK_WEBHOOK }} GIT_TAG_NAME: ${{ github.ref_name }} BUNDLE_IDENTIFIER: ${{ secrets.BUNDLE_IDENTIFIER }} + BUNDLE_IDENTIFIER_DEV: ${{ secrets.BUNDLE_IDENTIFIER_DEV }} XCODE_VERSION: "16.2" runs-on: macos-15 From 7bde647f9197e3d6604c5e69c28fe9687f3707e6 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 2 Aug 2025 22:46:17 +0900 Subject: [PATCH 27/29] fix: fix cd yaml support file name --- .github/workflows/cd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index bfe2a6ce..ea9c4662 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -76,7 +76,7 @@ jobs: echo "$BUNDLE_DEV" > "Siksha/Supporting Files/bundle-dev.xcconfig" echo "$CONFIG" > "Siksha/Supporting Files/config.plist" echo "$GOOGLE_SERVICE_INFO" > "Siksha/Supporting Files/GoogleService-Info.plist" - echo "$GOOGLE_SERVICE_INFO_DEV" > "Siksha/Supporting Files/GoogleService-Info-dev.xcconfig" + echo "$GOOGLE_SERVICE_INFO_DEV" > "Siksha/Supporting Files/GoogleService-Info-dev.plist" - name: Upload prod app to TestFlight From a99d142f885fdbde4b322544fcc84d2529d50acf Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 2 Aug 2025 22:47:13 +0900 Subject: [PATCH 28/29] fix: remove fastlane debug --- .github/workflows/cd.yaml | 4 ---- fastlane/Fastfile | 30 ------------------------------ 2 files changed, 34 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index ea9c4662..f9cb322d 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -83,7 +83,3 @@ jobs: if: ${{ steps.regex.outputs.group1 == 'testflight' && steps.regex.outputs.group5 == 'release' }} run: | bundle exec fastlane beta - - name: Upload dev app to TestFlight - if: ${{ steps.regex.outputs.group1 == 'testflight' && steps.regex.outputs.group5 == 'debug' }} - run: | - bundle exec fastlane beta_debug diff --git a/fastlane/Fastfile b/fastlane/Fastfile index c4226cc0..aa013bcd 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -48,37 +48,7 @@ platform :ios do slack(message:"uploaded to testflight") # add actions here: https://docs.fastlane.tools/actions end - lane :beta_debug do - ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "120" - setup_ci - app_store_connect_api_key( - key_id:ENV["APPSTORE_CONNECT_KEY_ID"], - issuer_id:ENV["APPSTORE_CONNECT_ISSUER_ID"], - key_content:ENV["APPSTORE_CONNECT_KEY_CONTENT"] - ) - match( - type: "appstore", - app_identifier:ENV["BUNDLE_IDENTIFIER_DEV"], - readonly: true - ) - - update_code_signing_settings( - use_automatic_signing: false, - code_sign_identity: "Apple Distribution", - profile_name:ENV["PROFILE_NAME"], - path:"Siksha.xcodeproj", - bundle_identifier:ENV["BUNDLE_IDENTIFIER_DEV"], - targets:"Siksha-Debug", - team_id:ENV["TEAM_ID"] - ) - build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Debug",configuration:"Debug",clean:true, silent:true) - increment_build_number(build_number:ENV["BUILD_NUMBER"],xcodeproj:"Siksha.xcodeproj") - increment_version_number(version_number:ENV["VERSION_NUMBER"],xcodeproj:"Siksha.xcodeproj") - upload_to_testflight(app_version:ENV["VERSION_NUMBER"]) - slack(message:"uploaded to testflight") - # add actions here: https://docs.fastlane.tools/actions - end end From 6f27b7cb7127ccc2ff467a4a2f386ff0204faa51 Mon Sep 17 00:00:00 2001 From: impri2 Date: Sat, 2 Aug 2025 23:21:07 +0900 Subject: [PATCH 29/29] fix: remove version increment in fastlane --- fastlane/Fastfile | 1 - 1 file changed, 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index aa013bcd..00f67a79 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -43,7 +43,6 @@ platform :ios do ) build_app(project:"Siksha.xcodeproj",scheme:"Siksha-Release",configuration:"Release",clean:true, silent:true) increment_build_number(build_number:ENV["BUILD_NUMBER"],xcodeproj:"Siksha.xcodeproj") - increment_version_number(version_number:ENV["VERSION_NUMBER"],xcodeproj:"Siksha.xcodeproj") upload_to_testflight(app_version:ENV["VERSION_NUMBER"]) slack(message:"uploaded to testflight") # add actions here: https://docs.fastlane.tools/actions