diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 0edc174..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..3452018 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,7 @@ +{ + "permissions": { + "deny": [ + "Read(**/.env*)" + ] + } +} diff --git a/.github/workflows/cdBeta.yml b/.github/workflows/cdBeta.yml index 1015405..04c50d0 100644 --- a/.github/workflows/cdBeta.yml +++ b/.github/workflows/cdBeta.yml @@ -59,6 +59,12 @@ jobs: run: | echo ${{ secrets.GOOGLE_SERVICE_INFO_PLIST_CONTENT }} | base64 -o ${{ env.GOOGLE_SERVICE_INFO_PLIST_PATH }} -D + # Match用SSHデプロイキーのセットアップ + - name: Setup SSH key for Match + uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.MATCH_SSH_KEY }} + # TestFlight用にデプロイ - name: deploy run: set -o pipefail && @@ -70,7 +76,6 @@ jobs: MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} FASTLANE_USER: ${{ secrets.FASTLANE_USER }} - MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GITHUB_TOKEN }} ENVIRONMENT: "CI" MATCH_FETCH_READ_ONLY_MODE: true SETUP_CI_PROVIDER: "travis" diff --git a/.github/workflows/cdRelease.yml b/.github/workflows/cdRelease.yml index 5e6b545..90c3f6a 100644 --- a/.github/workflows/cdRelease.yml +++ b/.github/workflows/cdRelease.yml @@ -58,7 +58,13 @@ jobs: run: | echo ${{ secrets.GOOGLE_SERVICE_INFO_PLIST_CONTENT }} | base64 -o ${{ env.GOOGLE_SERVICE_INFO_PLIST_PATH }} -D - # TestFlight用にデプロイ + # Match用SSHデプロイキーのセットアップ + - name: Setup SSH key for Match + uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.MATCH_SSH_KEY }} + + # App Store用にデプロイ - name: deploy run: set -o pipefail && bundle exec fastlane release --verbose @@ -69,7 +75,6 @@ jobs: MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} FASTLANE_USER: ${{ secrets.FASTLANE_USER }} - MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GITHUB_TOKEN }} ENVIRONMENT: "CI" MATCH_FETCH_READ_ONLY_MODE: true SETUP_CI_PROVIDER: "travis" diff --git a/.gitignore b/.gitignore index de2e9f1..065c1b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# macOS +.DS_Store +**/.DS_Store + # Xcode # # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore diff --git a/GemFile b/GemFile index 6908506..c2855ca 100644 --- a/GemFile +++ b/GemFile @@ -4,6 +4,4 @@ source "https://rubygems.org" git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } -gem "xcpretty" - -gem "fastlane" \ No newline at end of file +gem "fastlane", "~> 2.232.2" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 018c9bc..5b3500a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,45 +1,49 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.7) - base64 - nkf - rexml - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) + CFPropertyList (3.0.8) + abbrev (0.1.2) + addressable (2.8.9) + public_suffix (>= 2.0.2, < 8.0) artifactory (3.0.17) atomos (0.1.3) - aws-eventstream (1.3.0) - aws-partitions (1.973.0) - aws-sdk-core (3.204.0) + aws-eventstream (1.4.0) + aws-partitions (1.1228.0) + aws-sdk-core (3.244.0) aws-eventstream (~> 1, >= 1.3.0) - aws-partitions (~> 1, >= 1.651.0) + aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) + base64 + bigdecimal jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.90.0) - aws-sdk-core (~> 3, >= 3.203.0) + logger + aws-sdk-kms (1.123.0) + aws-sdk-core (~> 3, >= 3.244.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.161.0) - aws-sdk-core (~> 3, >= 3.203.0) + aws-sdk-s3 (1.217.0) + aws-sdk-core (~> 3, >= 3.244.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) - aws-sigv4 (1.9.1) + aws-sigv4 (1.12.1) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) base64 (0.2.0) + benchmark (0.5.0) + bigdecimal (4.0.1) claide (1.1.0) colored (1.2) colored2 (3.1.2) commander (4.6.0) highline (~> 2.0.0) + csv (3.3.5) declarative (0.0.20) - digest-crc (0.6.5) + digest-crc (0.7.0) rake (>= 12.0.0, < 14.0.0) domain_name (0.6.20240107) dotenv (2.8.1) emoji_regex (3.2.3) - excon (0.111.0) - faraday (1.10.3) + excon (0.112.0) + faraday (1.10.5) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -51,32 +55,36 @@ GEM faraday-rack (~> 1.0) faraday-retry (~> 1.0) ruby2_keywords (>= 0.0.4) - faraday-cookie_jar (0.0.7) + faraday-cookie_jar (0.0.8) faraday (>= 0.8.0) - http-cookie (~> 1.0.0) + http-cookie (>= 1.0.0) faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) + faraday-em_synchrony (1.0.1) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.0.4) - multipart-post (~> 2) + faraday-multipart (1.2.0) + multipart-post (~> 2.0) faraday-net_http (1.0.2) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) - faraday-retry (1.0.3) - faraday_middleware (1.2.0) + faraday-retry (1.0.4) + faraday_middleware (1.2.1) faraday (~> 1.0) - fastimage (2.3.1) - fastlane (2.222.0) + fastimage (2.4.1) + fastlane (2.232.2) CFPropertyList (>= 2.3, < 4.0.0) + abbrev (~> 0.1.2) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) - aws-sdk-s3 (~> 1.0) + aws-sdk-s3 (~> 1.197) babosa (>= 1.0.3, < 2.0.0) - bundler (>= 1.12.0, < 3.0.0) + base64 (~> 0.2.0) + benchmark (>= 0.1.0) + bundler (>= 1.17.3, < 5.0.0) colored (~> 1.2) commander (~> 4.6) + csv (~> 3.3) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) excon (>= 0.71.0, < 1.0.0) @@ -84,19 +92,24 @@ GEM faraday-cookie_jar (~> 0.0.6) faraday_middleware (~> 1.0) fastimage (>= 2.1.0, < 3.0.0) + fastlane-sirp (>= 1.0.0) gh_inspector (>= 1.1.2, < 2.0.0) google-apis-androidpublisher_v3 (~> 0.3) google-apis-playcustomapp_v1 (~> 0.1) - google-cloud-env (>= 1.6.0, < 2.0.0) + google-cloud-env (>= 1.6.0, <= 2.1.1) google-cloud-storage (~> 1.31) highline (~> 2.0) http-cookie (~> 1.0.5) json (< 3.0.0) jwt (>= 2.1.0, < 3) + logger (>= 1.6, < 2.0) mini_magick (>= 4.9.4, < 5.0.0) multipart-post (>= 2.0.0, < 3.0.0) + mutex_m (~> 0.3.0) naturally (~> 2.2) + nkf (~> 0.2.0) optparse (>= 0.1.1, < 1.0.0) + ostruct (>= 0.1.0) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) security (= 0.1.5) @@ -107,83 +120,92 @@ GEM tty-spinner (>= 0.8.0, < 1.0.0) word_wrap (~> 1.0.0) xcodeproj (>= 1.13.0, < 2.0.0) - xcpretty (~> 0.3.0) + xcpretty (~> 0.4.1) xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) + fastlane-sirp (1.0.0) + sysrandom (~> 1.0) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.54.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-core (0.11.3) + google-apis-androidpublisher_v3 (0.97.0) + google-apis-core (>= 0.15.0, < 2.a) + google-apis-core (0.18.0) addressable (~> 2.5, >= 2.5.1) - googleauth (>= 0.16.2, < 2.a) - httpclient (>= 2.8.1, < 3.a) + googleauth (~> 1.9) + httpclient (>= 2.8.3, < 3.a) mini_mime (~> 1.0) + mutex_m representable (~> 3.0) retriable (>= 2.0, < 4.a) - rexml - google-apis-iamcredentials_v1 (0.17.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-playcustomapp_v1 (0.13.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-storage_v1 (0.31.0) - google-apis-core (>= 0.11.0, < 2.a) - google-cloud-core (1.7.1) + google-apis-iamcredentials_v1 (0.26.0) + google-apis-core (>= 0.15.0, < 2.a) + google-apis-playcustomapp_v1 (0.17.0) + google-apis-core (>= 0.15.0, < 2.a) + google-apis-storage_v1 (0.61.0) + google-apis-core (>= 0.15.0, < 2.a) + google-cloud-core (1.8.0) google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) - google-cloud-env (1.6.0) - faraday (>= 0.17.3, < 3.0) - google-cloud-errors (1.4.0) - google-cloud-storage (1.47.0) + google-cloud-env (2.1.1) + faraday (>= 1.0, < 3.a) + google-cloud-errors (1.5.0) + google-cloud-storage (1.58.0) addressable (~> 2.8) digest-crc (~> 0.4) - google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.31.0) + google-apis-core (>= 0.18, < 2) + google-apis-iamcredentials_v1 (~> 0.18) + google-apis-storage_v1 (>= 0.42) google-cloud-core (~> 1.6) - googleauth (>= 0.16.2, < 2.a) + googleauth (~> 1.9) mini_mime (~> 1.0) - googleauth (1.8.1) - faraday (>= 0.17.3, < 3.a) + googleauth (1.11.2) + faraday (>= 1.0, < 3.a) + google-cloud-env (~> 2.1) jwt (>= 1.4, < 3.0) multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) highline (2.0.3) - http-cookie (1.0.7) + http-cookie (1.0.8) domain_name (~> 0.5) - httpclient (2.8.3) + httpclient (2.9.0) + mutex_m jmespath (1.6.2) - json (2.7.1) - jwt (2.8.2) + json (2.19.2) + jwt (2.10.2) base64 + logger (1.7.0) mini_magick (4.13.2) mini_mime (1.1.5) - multi_json (1.15.0) + multi_json (1.19.1) multipart-post (2.4.1) - nanaimo (0.3.0) - naturally (2.2.1) - nkf (0.1.3) - optparse (0.4.0) + mutex_m (0.3.0) + nanaimo (0.4.0) + naturally (2.3.0) + nkf (0.2.0) + optparse (0.8.1) os (1.1.4) - plist (3.7.1) - public_suffix (6.0.1) - rake (13.2.1) + ostruct (0.6.3) + plist (3.7.2) + public_suffix (7.0.5) + rake (13.3.1) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) - retriable (3.1.2) - rexml (3.3.7) - rouge (2.0.7) + retriable (3.4.1) + rexml (3.4.4) + rouge (3.28.0) ruby2_keywords (0.0.5) - rubyzip (2.3.2) + rubyzip (2.4.1) security (0.1.5) - signet (0.19.0) + signet (0.21.0) addressable (~> 2.8) faraday (>= 0.17.5, < 3.a) - jwt (>= 1.5, < 3.0) + jwt (>= 1.5, < 4.0) multi_json (~> 1.10) simctl (1.6.10) CFPropertyList naturally + sysrandom (1.0.5) terminal-notifier (2.0.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) @@ -193,17 +215,17 @@ GEM tty-spinner (0.9.3) tty-cursor (~> 0.7) uber (0.1.0) - unicode-display_width (2.5.0) + unicode-display_width (2.6.0) word_wrap (1.0.0) - xcodeproj (1.25.0) + xcodeproj (1.27.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) - nanaimo (~> 0.3.0) - rexml (>= 3.3.2, < 4.0) - xcpretty (0.3.0) - rouge (~> 2.0.7) + nanaimo (~> 0.4.0) + rexml (>= 3.3.6, < 4.0) + xcpretty (0.4.1) + rouge (~> 3.28.0) xcpretty-travis-formatter (1.0.1) xcpretty (~> 0.2, >= 0.0.7) @@ -211,8 +233,7 @@ PLATFORMS ruby DEPENDENCIES - fastlane - xcpretty + fastlane (~> 2.232.2) BUNDLED WITH - 2.5.18 + 2.5.22 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..694f834 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +RUBY_VERSION := 3.3.10 + +.PHONY: setup install-ruby install-bundler install help + +help: + @echo "Usage:" + @echo " make setup - Ruby のインストールから fastlane のセットアップまで一括実行" + @echo " make install - bundle install のみ実行(Ruby セットアップ済みの場合)" + +setup: install-ruby install-bundler install + +install-ruby: + @echo ">>> rbenv で Ruby $(RUBY_VERSION) をインストールします" + rbenv install -s $(RUBY_VERSION) + rbenv local $(RUBY_VERSION) + +install-bundler: + @echo ">>> bundler をインストールします" + gem install bundler --no-document + +install: + @echo ">>> fastlane をインストールします" + bundle install diff --git a/TimeWatcherPrj/.DS_Store b/TimeWatcherPrj/.DS_Store deleted file mode 100644 index 25f4b7d..0000000 Binary files a/TimeWatcherPrj/.DS_Store and /dev/null differ diff --git a/TimeWatcherPrj/TimeWatcher.xcodeproj/project.pbxproj b/TimeWatcherPrj/TimeWatcher.xcodeproj/project.pbxproj index 641a619..e08bb1d 100644 --- a/TimeWatcherPrj/TimeWatcher.xcodeproj/project.pbxproj +++ b/TimeWatcherPrj/TimeWatcher.xcodeproj/project.pbxproj @@ -791,12 +791,11 @@ buildSettings = { ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 56LYVN6DMF; + DEVELOPMENT_TEAM = 56LYVN6DMF; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = TimeWatcherWidget/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = TimeWatcherWidget; @@ -813,7 +812,6 @@ PRODUCT_BUNDLE_IDENTIFIER = taichi.satou.TimeWatcher.TimeWatcherWidget; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = TimeWatcher_Widget_Dev; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; @@ -852,7 +850,7 @@ PRODUCT_BUNDLE_IDENTIFIER = taichi.satou.TimeWatcher.TimeWatcherWidget; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore taichi.satou.TimeWatcher.TimeWatcherWidget"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore taichi.satou.TimeWatcher.TimeWatcherWidget 1773966855"; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; @@ -994,13 +992,12 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = "\"TimeWatcher/Preview Content\""; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 56LYVN6DMF; + DEVELOPMENT_TEAM = 56LYVN6DMF; ENABLE_PREVIEWS = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; GENERATE_INFOPLIST_FILE = YES; @@ -1024,7 +1021,6 @@ PRODUCT_BUNDLE_IDENTIFIER = taichi.satou.TimeWatcher; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = TimeWatcher_Dev; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; @@ -1071,7 +1067,7 @@ PRODUCT_BUNDLE_IDENTIFIER = taichi.satou.TimeWatcher; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore taichi.satou.TimeWatcher"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore taichi.satou.TimeWatcher 1773966853"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; diff --git a/fastlane/.env.skel b/fastlane/.env.skel new file mode 100644 index 0000000..62370ee --- /dev/null +++ b/fastlane/.env.skel @@ -0,0 +1,52 @@ +# ============================================================ +# fastlane 環境変数スケルトン +# 使い方: このファイルをコピーして .env という名前にし、各値を設定してください +# cp fastlane/.env.skel fastlane/.env +# ※ .env はコミットしないこと(.gitignore で除外済み) +# ============================================================ + +# ---------------------------------------- +# App Store Connect API Key +# https://appstoreconnect.apple.com/access/integrations/api +# ---------------------------------------- + +# API Key ID(例: XXXXXXXXXX) +ASC_KEY_ID= + +# Issuer ID(例: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) +ASC_ISSUER_ID= + +# API Key の内容(.p8 ファイルを base64 エンコードした文字列) +# base64 エンコード方法: base64 -i AuthKey_XXXXXXXXXX.p8 | tr -d '\n' +ASC_KEY_CONTENT= + +# ---------------------------------------- +# Match(コード署名) +# ---------------------------------------- + +# Match 証明書リポジトリの暗号化パスフレーズ +MATCH_PASSWORD= + +# Match をリードオンリーモードで実行するか(CI 環境では true 推奨) +# true: 既存の証明書を取得のみ / false または空: 必要なら新規作成も行う +MATCH_FETCH_READ_ONLY_MODE=true + +# Match が使用する Git リポジトリの SSH 秘密鍵(ローカル開発時) +# CI 環境では MATCH_SSH_KEY シークレットを使用するため不要 +# MATCH_GIT_SSH_KEY= + +# ---------------------------------------- +# CI 環境設定(GitHub Actions など) +# ---------------------------------------- + +# CI 環境かどうかを示すフラグ(CI 環境では "CI" を設定) +ENVIRONMENT= + +# setup_ci で使用するプロバイダー(例: circleci / github_actions) +SETUP_CI_PROVIDER=github_actions + +# CI 環境でのキーチェーン名(setup_ci が自動生成するため通常は不要) +# MATCH_KEYCHAIN_NAME= + +# CI 環境でのキーチェーンパスワード(setup_ci が自動生成するため通常は不要) +# MATCH_KEYCHAIN_PASSWORD= diff --git a/fastlane/Matchfile b/fastlane/Matchfile index 85750e1..d26b8dd 100644 --- a/fastlane/Matchfile +++ b/fastlane/Matchfile @@ -1,5 +1,5 @@ app_identifier(["taichi.satou.TimeWatcher","taichi.satou.TimeWatcher.TimeWatcherWidget"]) -git_url("https://github.com/stotic-dev/TimeWatcherSecret.git") +git_url("git@github.com:stotic-dev/TimeWatcherSecret.git") storage_mode("git")