From 8696137c8d5218cd35f48111a7064887d7133f03 Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 01:53:29 +0900 Subject: [PATCH 01/18] =?UTF-8?q?style:=20=EC=A0=95=ED=99=95=ED=95=98?= =?UTF-8?q?=EA=B2=8C=20=ED=85=8C=ED=94=8C=EC=9D=B4=EB=9D=BC=EB=8A=94=20?= =?UTF-8?q?=EC=9D=B4=EB=A6=84=20=EB=AA=85=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/testflight.yml | 4 ++-- fastlane/Fastfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testflight.yml b/.github/workflows/testflight.yml index 5d877ce..ca1db70 100644 --- a/.github/workflows/testflight.yml +++ b/.github/workflows/testflight.yml @@ -10,7 +10,7 @@ permissions: contents: read jobs: - beta: + testflight: runs-on: macos-latest timeout-minutes: 45 env: @@ -45,4 +45,4 @@ jobs: printf '%s' "$ASC_KEY_CONTENT" | base64 -D > "$ASC_KEY_PATH" - name: Upload to TestFlight - run: bundle exec fastlane beta + run: bundle exec fastlane testflight diff --git a/fastlane/Fastfile b/fastlane/Fastfile index b118be5..6939902 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -37,7 +37,7 @@ platform :ios do next api_key end - lane :beta do + lane :testflight do api_key = build_for_store upload_to_testflight( From 6772079078df088778ec712fa3459ba13898d590 Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 02:08:59 +0900 Subject: [PATCH 02/18] =?UTF-8?q?refactor:=20=EC=95=B1=20=EB=B9=8C?= =?UTF-8?q?=EB=93=9C=20=EC=8B=9C=EA=B0=84=20=EB=8B=A8=EC=B6=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 6939902..9a64042 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -11,6 +11,14 @@ platform :ios do end private_lane :build_for_store do + if ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"].to_s.strip.empty? + ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "30" + end + + if ENV["FASTLANE_XCODEBUILD_SETTINGS_RETRIES"].to_s.strip.empty? + ENV["FASTLANE_XCODEBUILD_SETTINGS_RETRIES"] = "5" + end + api_key = asc_api_key setup_ci if ENV["CI"] @@ -46,6 +54,10 @@ platform :ios do ) end + lane :testflight_build_only do + build_for_store + end + lane :release do api_key = build_for_store From d4fc32f50d2452b426a8a58b7d48150c60a1f785 Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 02:09:26 +0900 Subject: [PATCH 03/18] =?UTF-8?q?chore:=20fastlane/README.md=20=EC=B6=94?= =?UTF-8?q?=EC=A0=81=20=EB=81=84=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + fastlane/README.md | 40 ---------------------------------------- 2 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 fastlane/README.md diff --git a/.gitignore b/.gitignore index 328aec7..650d110 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ vendor/bundle/ # Fastlane .fastlane/ +fastlane/README.md fastlane/report.xml fastlane/test_output/ fastlane/logs/ diff --git a/fastlane/README.md b/fastlane/README.md deleted file mode 100644 index 761f24b..0000000 --- a/fastlane/README.md +++ /dev/null @@ -1,40 +0,0 @@ -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 beta - -```sh -[bundle exec] fastlane ios beta -``` - - - -### ios release - -```sh -[bundle exec] fastlane ios release -``` - - - ----- - -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). From 1822757c18b77e33c86104f34d8f2a1001a2e800 Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 02:33:31 +0900 Subject: [PATCH 04/18] =?UTF-8?q?test:=20lint=20=EB=AA=A8=EB=93=88=20valid?= =?UTF-8?q?ation=20=EC=8A=A4=ED=82=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 9a64042..096fc7a 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -39,7 +39,8 @@ platform :ios do build_app( project: "DevLog.xcodeproj", scheme: "DevLog", - export_method: "app-store" + export_method: "app-store-connect", + xcargs: "-skipPackagePluginValidation" ) next api_key From e8dc7d49885b753893d3bc786a9d430f8031492e Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 02:43:22 +0900 Subject: [PATCH 05/18] =?UTF-8?q?fix:=20=EB=82=B4=EB=B6=80=20testflight=20?= =?UTF-8?q?=EC=9D=B4=EB=A6=84=EA=B3=BC=20=EA=B2=B9=EC=B9=98=EB=8A=94=20?= =?UTF-8?q?=ED=98=84=EC=83=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/testflight.yml | 2 +- fastlane/Fastfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testflight.yml b/.github/workflows/testflight.yml index ca1db70..4935145 100644 --- a/.github/workflows/testflight.yml +++ b/.github/workflows/testflight.yml @@ -45,4 +45,4 @@ jobs: printf '%s' "$ASC_KEY_CONTENT" | base64 -D > "$ASC_KEY_PATH" - name: Upload to TestFlight - run: bundle exec fastlane testflight + run: bundle exec fastlane deploy_testflight diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 096fc7a..61ee245 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -46,7 +46,7 @@ platform :ios do next api_key end - lane :testflight do + lane :deploy_testflight do api_key = build_for_store upload_to_testflight( From c02c960c2eed770880bd0ad0c2a811cfb887c52d Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 02:45:42 +0900 Subject: [PATCH 06/18] =?UTF-8?q?fix:=20export=5Fmethod=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 61ee245..446a276 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -39,7 +39,7 @@ platform :ios do build_app( project: "DevLog.xcodeproj", scheme: "DevLog", - export_method: "app-store-connect", + export_method: "app-store", xcargs: "-skipPackagePluginValidation" ) From 0c61521ec6e35866329bc65ed013d1183d365ded Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 03:02:22 +0900 Subject: [PATCH 07/18] =?UTF-8?q?chore:=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=ED=94=8C=EB=9D=BC=EC=9D=B4=ED=8A=B8=20CI=20=EB=B0=B0=ED=8F=AC?= =?UTF-8?q?=20=EC=84=9C=EB=AA=85=20=EC=84=A4=EC=A0=95=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 446a276..f8c0ac0 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,3 +1,5 @@ +require "shellwords" + default_platform(:ios) platform :ios do @@ -36,11 +38,24 @@ platform :ios do readonly: ENV["CI"] == "true" ) + matchProvisioningProfileMapping = lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING] || {} + provisioningProfileSpecifier = matchProvisioningProfileMapping["opfic.DevLog"].to_s.strip + + UI.user_error!("Missing provisioning profile mapping for opfic.DevLog") if provisioningProfileSpecifier.empty? + + buildAppXcargs = [ + "-skipPackagePluginValidation", + "CODE_SIGN_STYLE=Manual", + "DEVELOPMENT_TEAM=#{ENV["APP_STORE_TEAM_ID"]}", + "CODE_SIGN_IDENTITY=#{Shellwords.escape("Apple Distribution")}", + "PROVISIONING_PROFILE_SPECIFIER=#{Shellwords.escape(provisioningProfileSpecifier)}" + ] + build_app( project: "DevLog.xcodeproj", scheme: "DevLog", export_method: "app-store", - xcargs: "-skipPackagePluginValidation" + xcargs: buildAppXcargs.join(" ") ) next api_key From ae00be7e0b5ec9b91ef4786de247795e6e038435 Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 03:15:30 +0900 Subject: [PATCH 08/18] =?UTF-8?q?chore:=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=ED=94=8C=EB=9D=BC=EC=9D=B4=ED=8A=B8=20CI=20=EC=84=9C=EB=AA=85?= =?UTF-8?q?=20=EC=98=B5=EC=85=98=20=EB=B3=B4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index f8c0ac0..690f68b 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,5 +1,3 @@ -require "shellwords" - default_platform(:ios) platform :ios do @@ -38,24 +36,12 @@ platform :ios do readonly: ENV["CI"] == "true" ) - matchProvisioningProfileMapping = lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING] || {} - provisioningProfileSpecifier = matchProvisioningProfileMapping["opfic.DevLog"].to_s.strip - - UI.user_error!("Missing provisioning profile mapping for opfic.DevLog") if provisioningProfileSpecifier.empty? - - buildAppXcargs = [ - "-skipPackagePluginValidation", - "CODE_SIGN_STYLE=Manual", - "DEVELOPMENT_TEAM=#{ENV["APP_STORE_TEAM_ID"]}", - "CODE_SIGN_IDENTITY=#{Shellwords.escape("Apple Distribution")}", - "PROVISIONING_PROFILE_SPECIFIER=#{Shellwords.escape(provisioningProfileSpecifier)}" - ] - build_app( project: "DevLog.xcodeproj", scheme: "DevLog", export_method: "app-store", - xcargs: buildAppXcargs.join(" ") + codesigning_identity: "Apple Distribution", + xcargs: "-skipPackagePluginValidation" ) next api_key From 2ba77070b7d1711423f47cdf37d05f903594f377 Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 09:38:51 +0900 Subject: [PATCH 09/18] =?UTF-8?q?fix:=20fastlane=20=EB=B0=B0=ED=8F=AC?= =?UTF-8?q?=EC=9A=A9=20=EC=9D=B8=EC=A6=9D=EC=84=9C=20=EC=84=A4=EC=B9=98=20?= =?UTF-8?q?=ED=9D=90=EB=A6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 690f68b..47a21e5 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -30,6 +30,12 @@ platform :ios do ) end + match( + api_key: api_key, + type: "development", + readonly: ENV["CI"] == "true" + ) + match( api_key: api_key, type: "appstore", @@ -40,7 +46,6 @@ platform :ios do project: "DevLog.xcodeproj", scheme: "DevLog", export_method: "app-store", - codesigning_identity: "Apple Distribution", xcargs: "-skipPackagePluginValidation" ) From 51c4b5785414d0e46b9c444f0cb5d710194d260b Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 09:53:19 +0900 Subject: [PATCH 10/18] =?UTF-8?q?feat:=20Apple=20Store=20Connect=EC=97=90?= =?UTF-8?q?=20=EC=98=AC=EB=9D=BC=EA=B0=84=20=EC=B5=9C=EC=8B=A0=20=EB=B9=8C?= =?UTF-8?q?=EB=93=9C=20=EB=B2=88=ED=98=B8=20+=201=20=ED=98=95=ED=83=9C?= =?UTF-8?q?=EB=A1=9C=20=EC=83=88=20=EB=B9=8C=EB=93=9C=20=EB=B2=88=ED=98=B8?= =?UTF-8?q?=EB=A5=BC=20=EA=B7=9C=EC=A0=95=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 47a21e5..2080d76 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -21,14 +21,24 @@ platform :ios do api_key = asc_api_key + versionNumber = get_version_number( + xcodeproj: "DevLog.xcodeproj", + target: "DevLog" + ) + + latestTestflightBuildNumber = latest_testflight_build_number( + api_key: api_key, + app_identifier: "opfic.DevLog", + version: versionNumber, + initial_build_number: 0 + ) + setup_ci if ENV["CI"] - if ENV["GITHUB_RUN_NUMBER"] - increment_build_number( - xcodeproj: "DevLog.xcodeproj", - build_number: ENV["GITHUB_RUN_NUMBER"] - ) - end + increment_build_number( + xcodeproj: "DevLog.xcodeproj", + build_number: latestTestflightBuildNumber + 1 + ) match( api_key: api_key, From e4fef3fd86456d009f2eab992fa7da83fe2f4ba1 Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 10:01:24 +0900 Subject: [PATCH 11/18] =?UTF-8?q?feat:=20=ED=83=80=EA=B9=83=EC=9D=98=20Rel?= =?UTF-8?q?ease=20=EC=84=9C=EB=AA=85=EC=9D=84=20=EC=88=98=EB=8F=99?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EA=B3=A0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 2080d76..b465e9e 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -52,6 +52,22 @@ platform :ios do readonly: ENV["CI"] == "true" ) + if ENV["CI"] == "true" + provisioningProfileSpecifier = lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING]["opfic.DevLog"].to_s + UI.user_error!("Missing App Store provisioning profile mapping for opfic.DevLog") if provisioningProfileSpecifier.empty? + + update_code_signing_settings( + use_automatic_signing: false, + path: "DevLog.xcodeproj", + sdk: "iphoneos*", + team_id: ENV["APP_STORE_TEAM_ID"], + targets: ["DevLog"], + build_configurations: ["Release"], + code_sign_identity: "Apple Distribution", + profile_name: provisioningProfileSpecifier + ) + end + build_app( project: "DevLog.xcodeproj", scheme: "DevLog", From 34b64538072b44a0f8b30d875c1914733f3494ea Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 10:11:23 +0900 Subject: [PATCH 12/18] =?UTF-8?q?style:=20=EB=AC=B8=EC=9E=90=EC=97=B4=20?= =?UTF-8?q?=EC=83=81=EC=88=98=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 5 +++-- .github/workflows/release.yml | 25 ++++++++++++++----------- .github/workflows/testflight.yml | 25 ++++++++++++++----------- fastlane/Fastfile | 24 ++++++++++++++---------- 4 files changed, 45 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64c65d9..de65198 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,7 @@ on: env: SCHEME: DevLog + XCODE_VERSION: latest permissions: contents: read @@ -22,7 +23,7 @@ jobs: - name: Set up Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: latest + xcode-version: ${{ env.XCODE_VERSION }} - name: Cache SwiftPM uses: actions/cache@v4 @@ -230,4 +231,4 @@ jobs: repo: context.repo.repo, issue_number: context.payload.pull_request.number, body - }); \ No newline at end of file + }); diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9620784..528f8b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,18 @@ on: branches: - main +env: + RUBY_VERSION: "3.2" + XCODE_VERSION: latest + APP_STORE_TEAM_ID: ${{ secrets.APP_STORE_TEAM_ID }} + ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }} + ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} + ASC_KEY_PATH: fastlane/AuthKey.p8 + SPACESHIP_CONNECT_API_IN_HOUSE: "false" + MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} + permissions: contents: read @@ -15,15 +27,6 @@ jobs: if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.ref == 'develop' runs-on: macos-latest timeout-minutes: 45 - env: - APP_STORE_TEAM_ID: ${{ secrets.APP_STORE_TEAM_ID }} - ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }} - ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} - ASC_KEY_PATH: fastlane/AuthKey.p8 - SPACESHIP_CONNECT_API_IN_HOUSE: "false" - MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} - MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} - MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} steps: - name: Checkout merge commit @@ -35,12 +38,12 @@ jobs: uses: ruby/setup-ruby@v1 with: bundler-cache: true - ruby-version: "3.2" + ruby-version: ${{ env.RUBY_VERSION }} - name: Set up Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: latest + xcode-version: ${{ env.XCODE_VERSION }} - name: Write App Store Connect API key env: diff --git a/.github/workflows/testflight.yml b/.github/workflows/testflight.yml index 4935145..cbfc4d9 100644 --- a/.github/workflows/testflight.yml +++ b/.github/workflows/testflight.yml @@ -6,6 +6,18 @@ on: - develop workflow_dispatch: +env: + RUBY_VERSION: "3.2" + XCODE_VERSION: latest + APP_STORE_TEAM_ID: ${{ secrets.APP_STORE_TEAM_ID }} + ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }} + ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} + ASC_KEY_PATH: fastlane/AuthKey.p8 + SPACESHIP_CONNECT_API_IN_HOUSE: "false" + MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} + permissions: contents: read @@ -13,15 +25,6 @@ jobs: testflight: runs-on: macos-latest timeout-minutes: 45 - env: - APP_STORE_TEAM_ID: ${{ secrets.APP_STORE_TEAM_ID }} - ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }} - ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} - ASC_KEY_PATH: fastlane/AuthKey.p8 - SPACESHIP_CONNECT_API_IN_HOUSE: "false" - MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} - MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} - MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} steps: - name: Checkout @@ -31,12 +34,12 @@ jobs: uses: ruby/setup-ruby@v1 with: bundler-cache: true - ruby-version: "3.2" + ruby-version: ${{ env.RUBY_VERSION }} - name: Set up Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: latest + xcode-version: ${{ env.XCODE_VERSION }} - name: Write App Store Connect API key env: diff --git a/fastlane/Fastfile b/fastlane/Fastfile index b465e9e..d60e6ee 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,3 +1,7 @@ +XCODE_PROJ = "DevLog.xcodeproj" +APP_IDENTIFIER = "opfic.DevLog" +TARGET_NAME = "DevLog" + default_platform(:ios) platform :ios do @@ -22,13 +26,13 @@ platform :ios do api_key = asc_api_key versionNumber = get_version_number( - xcodeproj: "DevLog.xcodeproj", - target: "DevLog" + xcodeproj: XCODE_PROJ, + target: TARGET_NAME ) latestTestflightBuildNumber = latest_testflight_build_number( api_key: api_key, - app_identifier: "opfic.DevLog", + app_identifier: APP_IDENTIFIER, version: versionNumber, initial_build_number: 0 ) @@ -36,7 +40,7 @@ platform :ios do setup_ci if ENV["CI"] increment_build_number( - xcodeproj: "DevLog.xcodeproj", + xcodeproj: XCODE_PROJ, build_number: latestTestflightBuildNumber + 1 ) @@ -53,15 +57,15 @@ platform :ios do ) if ENV["CI"] == "true" - provisioningProfileSpecifier = lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING]["opfic.DevLog"].to_s - UI.user_error!("Missing App Store provisioning profile mapping for opfic.DevLog") if provisioningProfileSpecifier.empty? + provisioningProfileSpecifier = lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING][APP_IDENTIFIER].to_s + UI.user_error!("Missing App Store provisioning profile mapping for #{APP_IDENTIFIER}") if provisioningProfileSpecifier.empty? update_code_signing_settings( use_automatic_signing: false, - path: "DevLog.xcodeproj", + path: XCODE_PROJ, sdk: "iphoneos*", team_id: ENV["APP_STORE_TEAM_ID"], - targets: ["DevLog"], + targets: [TARGET_NAME], build_configurations: ["Release"], code_sign_identity: "Apple Distribution", profile_name: provisioningProfileSpecifier @@ -69,8 +73,8 @@ platform :ios do end build_app( - project: "DevLog.xcodeproj", - scheme: "DevLog", + project: XCODE_PROJ, + scheme: TARGET_NAME, export_method: "app-store", xcargs: "-skipPackagePluginValidation" ) From 96ecc9332f4addfbf481a71aea1a7023cbc9cc3b Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 10:15:35 +0900 Subject: [PATCH 13/18] =?UTF-8?q?fix:=20Apple=20Store=20Connect=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=B5=9C=EC=8B=A0=20=EB=B9=8C=EB=93=9C=EB=B2=88?= =?UTF-8?q?=ED=98=B8=EB=A5=BC=20=EC=A1=B0=ED=9A=8C=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EB=AA=BB=ED=95=98=EB=8A=94=20=EC=9D=B4=EC=8A=88=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index d60e6ee..c763419 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -30,8 +30,8 @@ platform :ios do target: TARGET_NAME ) - latestTestflightBuildNumber = latest_testflight_build_number( - api_key: api_key, + latestTestflightBuildNumber = app_store_build_number( + live: false, app_identifier: APP_IDENTIFIER, version: versionNumber, initial_build_number: 0 From 550568b1f459ea1d258ff13c271ae3f95aa7b419 Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 10:21:49 +0900 Subject: [PATCH 14/18] =?UTF-8?q?fix:=20fastlane=20=EB=8C=80=EC=8B=A0=20sp?= =?UTF-8?q?aceship=EC=9D=84=20=ED=86=B5=ED=95=B4=20=EA=B0=80=EC=A0=B8?= =?UTF-8?q?=EC=98=A4=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index c763419..ed1d17d 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -5,6 +5,39 @@ TARGET_NAME = "DevLog" default_platform(:ios) platform :ios do + private_lane :fetch_latest_testflight_build_number do |options| + require "spaceship" + + versionNumber = options[:version] + + Spaceship::ConnectAPI.token = Spaceship::ConnectAPI::Token.create( + key_id: ENV["ASC_KEY_ID"], + issuer_id: ENV["ASC_ISSUER_ID"], + key: File.binread(ENV["ASC_KEY_PATH"]), + in_house: false + ) + + app = Spaceship::ConnectAPI::App.find(APP_IDENTIFIER) + UI.user_error!("Could not find app for #{APP_IDENTIFIER}") if app.nil? + + filter = { + "state" => "PROCESSING,FAILED,COMPLETE", + "cfBundleShortVersionString" => versionNumber, + "platform" => Spaceship::ConnectAPI::Platform.map("ios") + } + + build = Spaceship::ConnectAPI.get_build_uploads( + app_id: app.id, + filter: filter, + sort: "-uploadedDate", + limit: 1 + ).first + + next 0 if build.nil? + + next build.cf_build_version.to_i + end + private_lane :asc_api_key do app_store_connect_api_key( key_id: ENV["ASC_KEY_ID"], @@ -30,11 +63,8 @@ platform :ios do target: TARGET_NAME ) - latestTestflightBuildNumber = app_store_build_number( - live: false, - app_identifier: APP_IDENTIFIER, - version: versionNumber, - initial_build_number: 0 + latestTestflightBuildNumber = fetch_latest_testflight_build_number( + version: versionNumber ) setup_ci if ENV["CI"] From 345eccb2c3bc9d72ee9ab8fb728e65af0b40aef3 Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 10:27:07 +0900 Subject: [PATCH 15/18] =?UTF-8?q?fix:=20CI=20=ED=99=98=EA=B2=BD=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=8B=9C=ED=81=AC=EB=A6=BF=ED=82=A4=EB=A1=9C=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=EB=90=98=EB=8A=94=20p8=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EC=9C=84=EC=B9=98=EB=A5=BC=20=EC=B0=BE=EC=A7=80=20=EB=AA=BB?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=ED=98=84=EC=83=81=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index ed1d17d..958fa96 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -9,11 +9,12 @@ platform :ios do require "spaceship" versionNumber = options[:version] + ascKeyPath = File.expand_path(ENV["ASC_KEY_PATH"], Dir.pwd) Spaceship::ConnectAPI.token = Spaceship::ConnectAPI::Token.create( key_id: ENV["ASC_KEY_ID"], issuer_id: ENV["ASC_ISSUER_ID"], - key: File.binread(ENV["ASC_KEY_PATH"]), + key: File.binread(ascKeyPath), in_house: false ) From 47765c91e327c3f03daf6f4e03263b78c70e679d Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 10:31:36 +0900 Subject: [PATCH 16/18] =?UTF-8?q?fix:=20=EA=B2=BD=EB=A1=9C=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 958fa96..5a1905b 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,6 +1,7 @@ XCODE_PROJ = "DevLog.xcodeproj" APP_IDENTIFIER = "opfic.DevLog" TARGET_NAME = "DevLog" +PROJECT_ROOT = File.expand_path("..", __dir__) default_platform(:ios) @@ -9,7 +10,7 @@ platform :ios do require "spaceship" versionNumber = options[:version] - ascKeyPath = File.expand_path(ENV["ASC_KEY_PATH"], Dir.pwd) + ascKeyPath = File.expand_path(ENV["ASC_KEY_PATH"], PROJECT_ROOT) Spaceship::ConnectAPI.token = Spaceship::ConnectAPI::Token.create( key_id: ENV["ASC_KEY_ID"], From fe1a1e057ab65ca277c61066cd44058847392d7c Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 10:42:11 +0900 Subject: [PATCH 17/18] =?UTF-8?q?test:=20=ED=86=A0=ED=81=B0=20=EC=9E=AC?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20=EB=8C=80=EC=8B=A0=20=EA=B8=B0=EC=A1=B4?= =?UTF-8?q?=EC=97=90=20=EC=83=9D=EC=84=B1=ED=95=9C=20=EA=B2=83=EC=9D=84=20?= =?UTF-8?q?=EA=B7=B8=EB=8C=80=EB=A1=9C=20=EC=82=AC=EC=9A=A9=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 9 --------- 1 file changed, 9 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 5a1905b..e588195 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,7 +1,6 @@ XCODE_PROJ = "DevLog.xcodeproj" APP_IDENTIFIER = "opfic.DevLog" TARGET_NAME = "DevLog" -PROJECT_ROOT = File.expand_path("..", __dir__) default_platform(:ios) @@ -10,14 +9,6 @@ platform :ios do require "spaceship" versionNumber = options[:version] - ascKeyPath = File.expand_path(ENV["ASC_KEY_PATH"], PROJECT_ROOT) - - Spaceship::ConnectAPI.token = Spaceship::ConnectAPI::Token.create( - key_id: ENV["ASC_KEY_ID"], - issuer_id: ENV["ASC_ISSUER_ID"], - key: File.binread(ascKeyPath), - in_house: false - ) app = Spaceship::ConnectAPI::App.find(APP_IDENTIFIER) UI.user_error!("Could not find app for #{APP_IDENTIFIER}") if app.nil? From db8f37ceb40ea25873b74d7556916f437e8d1b0c Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 10 Mar 2026 10:47:59 +0900 Subject: [PATCH 18/18] =?UTF-8?q?refactor:=20api=5Fkey=20=EC=9E=90?= =?UTF-8?q?=EC=B2=B4=EB=A5=BC=20=EB=84=98=EA=B8=B0=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlane/Fastfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index e588195..d491150 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -8,8 +8,11 @@ platform :ios do private_lane :fetch_latest_testflight_build_number do |options| require "spaceship" + apiKey = options[:api_key] versionNumber = options[:version] + Spaceship::ConnectAPI.token = Spaceship::ConnectAPI::Token.create(**apiKey) + app = Spaceship::ConnectAPI::App.find(APP_IDENTIFIER) UI.user_error!("Could not find app for #{APP_IDENTIFIER}") if app.nil? @@ -57,6 +60,7 @@ platform :ios do ) latestTestflightBuildNumber = fetch_latest_testflight_build_number( + api_key: api_key, version: versionNumber )