Skip to content

Merge pull request #824 from YumNumm/dependabot/github_actions/depend… #186

Merge pull request #824 from YumNumm/dependabot/github_actions/depend…

Merge pull request #824 from YumNumm/dependabot/github_actions/depend… #186

Workflow file for this run

name: Deploy iOS
on:
workflow_dispatch:
push:
branches:
- develop
concurrency:
group: ${{ github.workflow }}
jobs:
build:
runs-on: macos-14
timeout-minutes: 60
env:
TZ: Asia/Tokyo
FLUTTER_VERSION:
FLUTTER_CHANNEL:
FLUTTER_HOME:
PRODUCE_USERNAME: yumnumm@icloud.com
SPACESHIP_ONLY_ALLOW_INTERACTIVE_2FA: false
FASTLANE_USER: yumnumm@icloud.com
MATCH_USERNAME: yumnumm@icloud.com
MATCH_GIT_URL: git@github.com:YumNumm/apple_secrets.git
LANG: ja_JP.UTF-8
steps:
# https://github.com/actions/checkout/tree/v4/
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- name: Setup Application Runtime
uses: ./.github/actions/setup-application-runtime
# Certificateを取得するために、Deploy Keyを設定
- name: Set up ssh key
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.SSH_ID_ED25519 }}" | base64 -d > ~/.ssh/id_ed25519
chmod 600 ~/.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
# https://github.com/maxim-lobanov/setup-xcode/tree/v1/
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd
with:
xcode-version: latest-stable
- name: Show Xcode version
run: xcodebuild -version
- name: Pre set up ruby
run: cp .ruby-version app/ios/.ruby-version
- name: Set up ruby
# https://github.com/ruby/setup-ruby/tree/v1/
uses: ruby/setup-ruby@52753b7da854d5c07df37391a986c76ab4615999
with:
bundler-cache: true
working-directory: app/ios
- name: Install brew dependencies
working-directory: app/ios
run: brew bundle
- name: Resolve dependencies
run: melos bootstrap
- name: Install Pods
working-directory: app/ios
run: bundle exec pod install
- name: Set Firebase Configuration
run: echo '${{ secrets.FIREBASE_IOS }}' | base64 -d > app/ios/Runner/GoogleService-Info.plist
- name: Set App Store Connect Configuration
working-directory: app
env:
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
run: |
echo '${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}' | base64 -d > ios/AuthKey_NGL2W4BQP6.p8
- name: Set .env
working-directory: app
run: echo '${{ secrets.ENV}}' | base64 -d > .env
- name: Regenerate code
working-directory: app
run: dart run build_runner build --delete-conflicting-outputs
- name: Build IPA
working-directory: app/ios
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 }}
PRODUCE_USERNAME: ${{ secrets.PRODUCE_USERNAME }}
SPACESHIP_ONLY_ALLOW_INTERACTIVE_2FA: false
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
FASTLANE_USER: yumnumm@icloud.com
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_USERNAME: yumnumm@icloud.com
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD}}
MATCH_GIT_URL: git@github.com:YumNumm/apple_secrets.git
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
LANG: ja_JP.UTF-8
run: bundle exec fastlane build
- name: Upload artifact ipa
uses: actions/upload-artifact@v4.4.0
with:
path: app/ios/Runner.ipa
name: release-ios
deploy:
runs-on: macos-latest
needs: build
steps:
# https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@v4
with:
# Fetch all history for all tags and branches
fetch-depth: 0
- name: Download artifact ipa
uses: actions/download-artifact@v4
with:
name: release-ios
path: app/ios/output
- name: Install Gems
working-directory: app/ios
run: |
gem install bundler
bundle install
- name: Install Brewfile dependencies
working-directory: app/ios
run: brew bundle
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- name: Show Xcode version
run: xcodebuild -version
- name: Set App Store Connect Configuration
working-directory: app
env:
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
run: |
echo '${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}' | base64 -d > ios/AuthKey_NGL2W4BQP6.p8
- name: Upload
run: |
mv output/Runner.ipa Runner.ipa
bundle exec fastlane upload
working-directory: app/ios