ExportOptions.plist を更新 #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy iOS | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main, develop, release/*] | |
jobs: | |
build: | |
runs-on: macos-latest | |
timeout-minutes: 60 | |
env: | |
TZ: Asia/Tokyo | |
FLUTTER_VERSION: | |
FLUTTER_CHANNEL: | |
FLUTTER_HOME: | |
steps: | |
# https://github.com/actions/checkout | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up ssh | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.SSH_ID_ED25519 }}" | base64 -d > ~/.ssh/id_ed25519 | |
chmod 700 ~/.ssh/id_ed25519 | |
eval $(ssh-agent -s) | |
echo "Host github.com \n\tIdentityFile ~/.ssh/id_ed25519\n\tUser git\n\tIdentityiesOnly yes" >> ~/.ssh/config | |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest | |
- name: Show Xcode version | |
run: xcodebuild -version | |
- name: Fetch flutter config | |
uses: kuhnroyal/flutter-fvm-config-action@v2 | |
# https://github.com/subosito/flutter-action | |
- name: Setup flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} | |
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }} | |
- name: Setup melos | |
run: | | |
ln -s $FLUTTER_ROOT .fvm/flutter_sdk | |
dart pub global activate melos | |
melos bootstrap | |
- name: Run build_runner | |
run: | | |
echo '${{ secrets.ENV }}' | base64 -d > app/.env | |
ln -s $FLUTTER_ROOT .fvm/flutter_sdk | |
melos generate | |
- name: Cache Pods | |
uses: actions/cache@v2 | |
with: | |
path: app/ios/Pods | |
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pods- | |
- name: Install CocoaPods | |
run: | | |
cd app/ios | |
pod install | |
- name: Get Firebase Configuration | |
run: echo '${{ secrets.FIREBASE_IOS }}' | base64 -d > app/ios/Runner/GoogleService-Info.plist | |
- name: Prebuild | |
working-directory: app | |
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 }} | |
APP_STORE_CONNECT_API_KEY_BASE64: ${{secrets.APP_STORE_CONNECT_API_KEY_BASE64 }} | |
run: | | |
flutter build ipa --release --no-codesign | |
echo '${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}' | base64 -d > AuthKey_NGL2W4BQP6.p8 | |
cp *.p8 ios/ | |
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`/AuthKey_NGL2W4BQP6.p8 | |
- name: Upload to App Store Connect | |
working-directory: app | |
env: | |
PRODUCE_USERNAME: ${{ secrets.PRODUCE_USERNAME }} | |
SPACESHIP_ONLY_ALLOW_INTERACTIVE_2FA: false | |
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }} | |
LANG: ja_JP.UTF-8 | |
run: fastlane beta |