Skip to content

Commit

Permalink
Merge pull request #182 from kosukesaigusa/cd/release_to_dev
Browse files Browse the repository at this point in the history
ci: add release_to_dev cd
  • Loading branch information
kosukesaigusa authored Sep 5, 2023
2 parents 1dbfb02 + 9d24a48 commit 059011c
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 1 deletion.
60 changes: 60 additions & 0 deletions .github/workflows/release_to_dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Flutter CI/CD

on:
push:
branches:
- release_to_dev

jobs:
build:
runs-on: macOS-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Read Flutter SDK version
run: echo "FLUTTER_VERSION=$(jq -r '.flutterSdkVersion' .fvm/fvm_config.json)" >> $GITHUB_ENV
shell: bash

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}

- name: flutter pub get (dart_flutter_common)
run: cd packages/dart_flutter_common && flutter pub get

- name: flutter pub get (firebase_common)
run: cd packages/firebase_common && flutter pub get

- name: flutter pub get (mottai_flutter_app)
run: cd packages/mottai_flutter_app && flutter pub get

- name: Flutter Build IPA
run: |
cd packages/mottai_flutter_app
flutter build ipa --release \
--dart-define-from-file="dart_defines/dev-dart-define.json" \
-t "lib/main.dart" \
--build-name=$(grep 'version:' pubspec.yaml | cut -d ' ' -f 2 | cut -d '+' -f 1) \
--build-number=$GITHUB_RUN_NUMBER \
--export-options-plist="ios/ExportOptions.plist"
- name: Validate IPA
run: |
xcrun altool --validate-app \
-f "./packages/mottai_flutter_app/build/ios/ipa/mottai_dev.ipa" \
-t ios \
--apiKey ${{ secrets.DEV_IOS_API_KEY }} \
--apiIssuer ${{ secrets.DEV_IOS_API_ISSUER }} \
--private-key ${{ secrets.DEV_IOS_AUTH_KEY }}
- name: Upload IPA to TestFlight
run: |
xcrun altool --upload-app \
-f "./packages/mottai_flutter_app/build/ios/ipa/mottai_dev.ipa" \
-t ios \
--apiKey ${{ secrets.DEV_IOS_API_KEY }} \
--apiIssuer ${{ secrets.DEV_IOS_API_ISSUER }} \
--private-key ${{ secrets.DEV_IOS_AUTH_KEY }}
20 changes: 20 additions & 0 deletions packages/mottai_flutter_app/ios/ExportOptions.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?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>method</key>
<string>app-store</string>
<key>signingStyle</key>
<string>automatic</string>
<key>stripSwiftSymbols</key>
<true/>
<key>teamID</key>
<string>M92JZ2K56V</string>
<key>uploadBitcode</key>
<false/>
<key>uploadSymbols</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion packages/mottai_flutter_app/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: mottai_flutter_app
description: MOTTAI mobile app.
publish_to: "none"
version: 0.0.1
version: 1.0.1

environment:
sdk: ">=3.0.0 <4.0.0"
Expand Down

0 comments on commit 059011c

Please sign in to comment.