diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..eb52e453 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,60 @@ +name: Release + +on: + push: + tags: + - "v*" + +jobs: + testflight: + + runs-on: macos-latest + + steps: + # 레파지토리 체크인 + - name: Checkout + uses: actions/checkout@v4 + + # 태그 번호 가져오기 + - name: Extract version from tag + id: ver + run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT + + # 태그 번호 가져오기 + - name: Print version + run: echo "Version is ${{ steps.ver.outputs.VERSION }}" + + # XCConfig / GoogleService 등의 파일을 클론 + - name: Clone Secret file + uses: actions/checkout@v4 + with: + repository: ESTiOSAI/Secrets + path: temp/ + token: ${{ secrets.SECRET_TOKEN }} + + # 가져온 파일 이동 + - name: Move config + run: | + mv temp/XCConfig/Secrets.xcconfig AIProject/iCo/App/Resource/ + mv temp/GoogleServices/GoogleService-Info.plist AIProject/iCo/App/Resource/ + + - name: Configure git auth for match repo + run: git config --global url."https://${GIT_TOKEN}@github.com/".insteadOf "https://github.com/" + env: + GIT_TOKEN: ${{ secrets.GIT_TOKEN }} + + - name: install fastlane + run: brew install fastlane + + - name: execute lane + working-directory: AIProject + run: fastlane release version:${{ steps.ver.outputs.VERSION }} + env: + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} + GIT_TOKEN: ${{ secrets.GIT_TOKEN }} + 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 }} + KEYCHAIN_NAME: ${{ secrets.KEYCHAIN_NAME }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} diff --git a/AIProject/fastlane/Fastfile b/AIProject/fastlane/Fastfile index 4467fd94..aa6ecea8 100644 --- a/AIProject/fastlane/Fastfile +++ b/AIProject/fastlane/Fastfile @@ -1,6 +1,60 @@ default_platform(:ios) platform :ios do + desc "appstore 업로드" + lane :release do |version:| + api_key = + app_store_connect_api_key( + key_id: ENV["APP_STORE_CONNECT_KEY_ID"], + is_key_content_base64: true, + issuer_id: ENV["APP_STORE_CONNECT_ISSUER_ID"], + key_content: ENV["APP_STORE_CONNECT_KEY_CONTENT"], + in_house: false + ) + + create_keychain( + name: ENV["KEYCHAIN_NAME"], + password: ENV["KEYCHAIN_PASSWORD"], + timeout: 1800, + default_keychain: true, + unlock: true, + lock_when_sleeps: false + ) + + increment_build_number + + match( + type: "appstore", + keychain_name: ENV["KEYCHAIN_NAME"], + keychain_password: ENV["KEYCHAIN_PASSWORD"], + readonly: true + ) + + build_app( + scheme: "iCo", + clean: true, + export_method: "app-store", + export_options: { + signingStyle: "manual", + provisioningProfiles: { + "com.est.ico" => "match AppStore com.est.ico", + "com.est.ico.widget" => "match AppStore com.est.ico.widget" + } + } + ) + + upload_to_app_store( + app_version: version, + submit_for_review: false, + force: true, + automatic_release: false, + skip_screenshots: true, + skip_metadata: true, + precheck_include_in_app_purchases: false, + submission_information: { add_id_info_uses_idfa: false } + ) + end + desc "빌드하고 TestFlight에 업로드" lane :testflight do @@ -52,4 +106,5 @@ platform :ios do changelog: "새로운 기능 및 버그 수정" ) end -end \ No newline at end of file +end + diff --git a/AIProject/iCo.xcodeproj/project.pbxproj b/AIProject/iCo.xcodeproj/project.pbxproj index b29b2655..70d478a7 100644 --- a/AIProject/iCo.xcodeproj/project.pbxproj +++ b/AIProject/iCo.xcodeproj/project.pbxproj @@ -552,6 +552,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = iCo/App/Resource/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "아이코"; + INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; @@ -593,6 +594,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = iCo/App/Resource/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "아이코"; + INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES;