From 7094cffb8cbe926209229a52b7589ead424d85cb Mon Sep 17 00:00:00 2001 From: mooninbeom Date: Sat, 28 Jun 2025 14:48:14 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[#44]=20Fastfile=EC=88=98=EC=A0=95(Slack=20?= =?UTF-8?q?->=20Discord=20=EC=9B=B9=ED=9B=85=20=EB=B3=80=EA=B2=BD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/testflight.yml | 1 + Gemfile | 3 +++ Gemfile.lock | 36 ++++++++++++++++++++++++++++++++ fastlane/Fastfile | 32 +++++++++++++++++++++++++++- fastlane/Pluginfile | 5 +++++ 5 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 fastlane/Pluginfile diff --git a/.github/workflows/testflight.yml b/.github/workflows/testflight.yml index 1710328..7b6ecb1 100644 --- a/.github/workflows/testflight.yml +++ b/.github/workflows/testflight.yml @@ -6,6 +6,7 @@ on: pull_request: branches: - main + - develop jobs: build-upload-testflight: diff --git a/Gemfile b/Gemfile index 7a118b4..cdd3a6b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,6 @@ source "https://rubygems.org" gem "fastlane" + +plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') +eval_gemfile(plugins_path) if File.exist?(plugins_path) diff --git a/Gemfile.lock b/Gemfile.lock index bb63134..6219db7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -37,9 +37,19 @@ GEM declarative (0.0.20) digest-crc (0.7.0) rake (>= 12.0.0, < 14.0.0) + discordrb (3.3.0) + discordrb-webhooks (~> 3.3.0) + ffi (>= 1.9.24) + opus-ruby + rbnacl (~> 3.4.0) + rest-client (>= 2.1.0.rc1) + websocket-client-simple (>= 0.3.0) + discordrb-webhooks (3.3.0) + rest-client (>= 2.1.0.rc1) domain_name (0.6.20240107) dotenv (2.8.1) emoji_regex (3.2.3) + event_emitter (0.2.6) excon (0.112.0) faraday (1.10.4) faraday-em_http (~> 1.0) @@ -112,8 +122,12 @@ GEM xcodeproj (>= 1.13.0, < 2.0.0) xcpretty (~> 0.4.1) xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) + fastlane-plugin-discord_notifier (0.1.7) + discordrb (~> 3.3.0) fastlane-sirp (1.0.0) sysrandom (~> 1.0) + ffi (1.17.2) + ffi (1.17.2-arm64-darwin) gh_inspector (1.1.3) google-apis-androidpublisher_v3 (0.54.0) google-apis-core (>= 0.11.0, < 2.a) @@ -152,6 +166,7 @@ GEM os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) highline (2.0.3) + http-accept (1.7.0) http-cookie (1.0.8) domain_name (~> 0.5) httpclient (2.9.0) @@ -161,6 +176,10 @@ GEM jwt (2.10.1) base64 logger (1.7.0) + mime-types (3.7.0) + logger + mime-types-data (~> 3.2025, >= 3.2025.0507) + mime-types-data (3.2025.0624) mini_magick (4.13.2) mini_mime (1.1.5) multi_json (1.15.0) @@ -168,16 +187,26 @@ GEM mutex_m (0.3.0) nanaimo (0.4.0) naturally (2.3.0) + netrc (0.11.0) nkf (0.2.0) optparse (0.6.0) + opus-ruby (1.0.1) + ffi os (1.1.4) plist (3.7.2) public_suffix (6.0.2) rake (13.3.0) + rbnacl (3.4.0) + ffi representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) + rest-client (2.1.0) + http-accept (>= 1.7.0, < 2.0) + http-cookie (>= 1.0.2, < 2.0) + mime-types (>= 1.16, < 4.0) + netrc (~> 0.8) retriable (3.1.2) rexml (3.4.1) rouge (3.28.0) @@ -203,6 +232,12 @@ GEM tty-cursor (~> 0.7) uber (0.1.0) unicode-display_width (2.6.0) + websocket (1.2.11) + websocket-client-simple (0.9.0) + base64 + event_emitter + mutex_m + websocket word_wrap (1.0.0) xcodeproj (1.27.0) CFPropertyList (>= 2.3.3, < 4.0) @@ -222,6 +257,7 @@ PLATFORMS DEPENDENCIES fastlane + fastlane-plugin-discord_notifier BUNDLED WITH 2.6.9 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index da94af5..7cf9059 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -97,11 +97,17 @@ platform :ios do ) slack( - message: "Build Number: #{new_build_number} 배포 준비 시작", + message: "Build Number: #{new_build_number} 배포 준비", channel: "#run_mile", slack_url: "#{ENV["SLACK_URL"]}" ) + discord_notifier( + webhook_url: "#{ENV["DISCORD_URL"]}", + title: "Run Mile 배포 준비", + description: "Build Number: #{new_build_number} 배포를 위해 준비중입니다." + ) + setup_ci match(type: "appstore") @@ -112,6 +118,12 @@ platform :ios do slack_url: "#{ENV["SLACK_URL"]}" ) + discord_notifier( + webhook_url: "#{ENV["DISCORD_URL"]}", + title: "Run Mile 인증서 완료", + description: "Build Number: #{new_build_number} 인증서 준비가 완료되었습니다." + ) + build_app( scheme: "Run Mile", xcodebuild_formatter: "xcpretty" @@ -123,6 +135,12 @@ platform :ios do slack_url: "#{ENV["SLACK_URL"]}" ) + discord_notifier( + webhook_url: "#{ENV["DISCORD_URL"]}", + title: "Run Mile 아카이브 완료", + description: "Build Number: #{new_build_number} 아카이브가 완료되었습니다." + ) + upload_to_testflight slack( @@ -130,6 +148,12 @@ platform :ios do channel: "#run_mile", slack_url: "#{ENV["SLACK_URL"]}" ) + + discord_notifier( + webhook_url: "#{ENV["DISCORD_URL"]}", + title: "Run Mile Testflight 배포 완료", + description: "Build Number: #{new_build_number} 테스트 플라이트 배포가 완료되었습니다." + ) end error do |lane, exception, options| @@ -139,5 +163,11 @@ platform :ios do success: false, slack_url: "#{ENV["SLACK_URL"]}" ) + + discord_notifier( + webhook_url: "#{ENV["DISCORD_URL"]}", + title: "Testflight 배포 중 오류가 발생했습니다.", + description: "에러 메시지\n#{exception}" + ) end end diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile new file mode 100644 index 0000000..7ef2b02 --- /dev/null +++ b/fastlane/Pluginfile @@ -0,0 +1,5 @@ +# Autogenerated by fastlane +# +# Ensure this file is checked in to source control! + +gem 'fastlane-plugin-discord_notifier' From 05520021dbd7191b742e717a98b8f7dfac1761b7 Mon Sep 17 00:00:00 2001 From: mooninbeom Date: Sat, 28 Jun 2025 14:55:30 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[#44]=20=EC=9B=8C=ED=81=AC=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=EC=9A=B0=20=EC=88=98=EC=A0=95(=ED=99=98=EA=B2=BD=20?= =?UTF-8?q?=EB=B3=80=EC=88=98=20=EC=B6=94=EA=B0=80)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/testflight.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testflight.yml b/.github/workflows/testflight.yml index 7b6ecb1..27d037a 100644 --- a/.github/workflows/testflight.yml +++ b/.github/workflows/testflight.yml @@ -56,6 +56,7 @@ jobs: APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} SLACK_URL: ${{ secrets.SLACK_URL }} + DISCORD_URL: ${{ secrets.DISCORD_URL }} run: bundle exec fastlane testflight - name: Upload Artifacts From 94d7f918f17e5ce256c297715f7131b7f35896d9 Mon Sep 17 00:00:00 2001 From: mooninbeom Date: Sat, 28 Jun 2025 15:23:15 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[#44]=20CI/CD=20=EC=88=98=EC=A0=95(Slack=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C,=20lane=EB=AA=85=20=EB=B3=80=EA=B2=BD,=20?= =?UTF-8?q?=EA=B9=83=ED=97=88=EB=B8=8C=20=ED=8A=B8=EB=A6=AC=EA=B1=B0=20?= =?UTF-8?q?=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 | 4 +--- fastlane/Fastfile | 33 +------------------------------- 2 files changed, 2 insertions(+), 35 deletions(-) diff --git a/.github/workflows/testflight.yml b/.github/workflows/testflight.yml index 27d037a..89129bb 100644 --- a/.github/workflows/testflight.yml +++ b/.github/workflows/testflight.yml @@ -6,7 +6,6 @@ on: pull_request: branches: - main - - develop jobs: build-upload-testflight: @@ -55,9 +54,8 @@ jobs: APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} - SLACK_URL: ${{ secrets.SLACK_URL }} DISCORD_URL: ${{ secrets.DISCORD_URL }} - run: bundle exec fastlane testflight + run: bundle exec fastlane upload_testflight - name: Upload Artifacts uses: actions/upload-artifact@v4 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 7cf9059..c7d44f2 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -61,7 +61,7 @@ platform :ios do desc "Push a new beta build to TestFlight" - lane :testflight do + lane :upload_testflight do app_store_connect_api_key( key_id: "#{ENV["APP_STORE_CONNECT_KEY_ID"]}", @@ -96,12 +96,6 @@ platform :ios do build_number: new_build_number ) - slack( - message: "Build Number: #{new_build_number} 배포 준비", - channel: "#run_mile", - slack_url: "#{ENV["SLACK_URL"]}" - ) - discord_notifier( webhook_url: "#{ENV["DISCORD_URL"]}", title: "Run Mile 배포 준비", @@ -112,12 +106,6 @@ platform :ios do match(type: "appstore") - slack( - message: "Build Number: #{new_build_number} 인증서 준비 완료", - channel: "#run_mile", - slack_url: "#{ENV["SLACK_URL"]}" - ) - discord_notifier( webhook_url: "#{ENV["DISCORD_URL"]}", title: "Run Mile 인증서 완료", @@ -129,12 +117,6 @@ platform :ios do xcodebuild_formatter: "xcpretty" ) - slack( - message: "Build Number: #{new_build_number} 아카이브 완료", - channel: "#run_mile", - slack_url: "#{ENV["SLACK_URL"]}" - ) - discord_notifier( webhook_url: "#{ENV["DISCORD_URL"]}", title: "Run Mile 아카이브 완료", @@ -143,12 +125,6 @@ platform :ios do upload_to_testflight - slack( - message: "Build Number: #{new_build_number} 배포 성공!", - channel: "#run_mile", - slack_url: "#{ENV["SLACK_URL"]}" - ) - discord_notifier( webhook_url: "#{ENV["DISCORD_URL"]}", title: "Run Mile Testflight 배포 완료", @@ -157,13 +133,6 @@ platform :ios do end error do |lane, exception, options| - slack( - message: "Testflight 배포 중 오류가 발생했습니다. #{exception}", - channel: "#run_mile", - success: false, - slack_url: "#{ENV["SLACK_URL"]}" - ) - discord_notifier( webhook_url: "#{ENV["DISCORD_URL"]}", title: "Testflight 배포 중 오류가 발생했습니다.",