Skip to content

Commit

Permalink
iOSの署名管理をCloud-managed certificatesへ変更 (#635)
Browse files Browse the repository at this point in the history
* fix
  • Loading branch information
YumNumm authored Apr 8, 2024
1 parent c4abc2c commit 108b720
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 23 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/deploy-ios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,36 @@ jobs:

- name: Prebuild
working-directory: app
run: flutter build ios --release --no-codesign
env:
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
run: |
flutter build ipa --release --no-codesign
xcodebuild \
-workspace ios/Runner.xcworkspace \
-scheme Runner \
-sdk iphoneos \
-configuration Release archive \
-archivePath build/ios/Runner.xcarchive \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
xcodebuild -exportArchive \
-archivePath build/ios/Runner.xcarchive \
-exportOptionsPlist ios/ExportOptions.plist \
-exportPath build/ios/ipa -allowProvisioningUpdates \
-authenticationKeyIssuerID ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} \
-authenticationKeyID ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }} \
-authenticationKeyPath `pwd`/private_keys/AuthKey_${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}.p8
- name: Upload to App Store Connect
working-directory: app
env:
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
PRODUCE_USERNAME: ${{ secrets.PRODUCE_USERNAME }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
SPACESHIP_ONLY_ALLOW_INTERACTIVE_2FA: false
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }}
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
LANG: ja_JP.UTF-8
run: |
cd app/ios
echo '${{ secrets.APP_STORE_CONNECT_KEY }}' | base64 -d > AuthKey_HAZX33F4T7.p8
cd app
echo '${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}' | base64 -d > AuthKey_NGL2W4BQP6.p8
fastlane beta
24 changes: 24 additions & 0 deletions app/ios/ExportOptions.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>destination</key>
<string>export</string>
<key>generateAppStoreInformation</key>
<false/>
<key>manageAppVersionAndBuildNumber</key>
<true/>
<key>method</key>
<string>app-store-connect</string>
<key>signingStyle</key>
<string>automatic</string>
<key>stripSwiftSymbols</key>
<true/>
<key>teamID</key>
<string>CPL7H8SHVM</string>
<key>testFlightInternalTestingOnly</key>
<false/>
<key>uploadSymbols</key>
<true/>
</dict>
</plist>
8 changes: 2 additions & 6 deletions app/ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@ platform :ios do
desc "Push a new beta build to TestFlight"
lane :beta do
app_store_connect_api_key(
key_id: "HAZX33F4T7",
key_id: "NGL2W4BQP6",
issuer_id: "fd4cca56-716b-4f03-8e44-de72a03453db",
key_filepath: "./AuthKey_HAZX33F4T7.p8"
key_filepath: "./AuthKey_NGL2W4BQP6.p8"
)
increment_build_number(
build_number: latest_testflight_build_number + 1,
xcodeproj: "Runner.xcodeproj",
)
# Step 2 - Download provisioning profiles and certificates
match(
readonly: true,
)

# Step 3 - Build the project
build_app(
Expand Down
8 changes: 0 additions & 8 deletions app/ios/fastlane/Matchfile

This file was deleted.

0 comments on commit 108b720

Please sign in to comment.