Skip to content

Commit

Permalink
テスト用
Browse files Browse the repository at this point in the history
  • Loading branch information
4ster1sk committed Oct 24, 2024
1 parent 1f35441 commit 02a723e
Show file tree
Hide file tree
Showing 3 changed files with 162 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: テストビルド(iOS/Android)

on: [workflow_dispatch]

jobs:
build_for_iOS:
name: iOS・Android用テストビルド
runs-on: macos-latest

steps:
- uses: actions/checkout@v4

- name: Install flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_FVM_VERSION }}
cache: true

- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'


- name: Cache pubspec dependencies
uses: actions/cache@v4
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.packages
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
build-pubspec-
- name: Create symbolic link
run: ln -s ${{ env.FLUTTER_ROOT }} $HOME/work/flutter

- name: Flutter pub get
run: flutter pub get

- name: Run flutter test with coverage
run: flutter test --coverage --coverage-path=~/coverage/lcov.info

- name: Create archive file
run: flutter build ipa --no-tree-shake-icons --release --no-codesign

- name: Create apk file
run: |
echo -n "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode --output ./android/release.keystore
export ANDROID_KEYSTORE_PASSWORD="${{ secrets.ANDROID_KEYSTORE_PASSWORD }}"
export ANDROID_KEY_ALIAS="${{ secrets.ANDROID_KEY_ALIAS }}"
export ANDROID_KEY_PASSWORD="${{ secrets.ANDROID_KEY_PASSWORD }}"
flutter build apk --no-tree-shake-icons --release
mv ./build/app/outputs/flutter-apk/app-release.apk ./build/app/outputs/flutter-apk/miria-$BUMP_VERSION.apk
55 changes: 55 additions & 0 deletions .github/workflows/build_test_android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: テストビルド(Android)

on: [workflow_dispatch]

jobs:
build_for_iOS:
name: Android用テストビルド
runs-on: macos-latest

steps:
- uses: actions/checkout@v4

- name: Install flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_FVM_VERSION }}
cache: true

- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'


- name: Cache pubspec dependencies
uses: actions/cache@v4
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.packages
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
build-pubspec-
- name: Create symbolic link
run: ln -s ${{ env.FLUTTER_ROOT }} $HOME/work/flutter

- name: Flutter pub get
run: flutter pub get

- name: Run flutter test with coverage
run: flutter test --coverage --coverage-path=~/coverage/lcov.info

- name: Create apk file
run: |
echo -n "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode --output ./android/release.keystore
export ANDROID_KEYSTORE_PASSWORD="${{ secrets.ANDROID_KEYSTORE_PASSWORD }}"
export ANDROID_KEY_ALIAS="${{ secrets.ANDROID_KEY_ALIAS }}"
export ANDROID_KEY_PASSWORD="${{ secrets.ANDROID_KEY_PASSWORD }}"
flutter build apk --no-tree-shake-icons --release
mv ./build/app/outputs/flutter-apk/app-release.apk ./build/app/outputs/flutter-apk/miria-$BUMP_VERSION.apk
49 changes: 49 additions & 0 deletions .github/workflows/build_test_ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: テストビルド(iOS)

on: [workflow_dispatch]

jobs:
build_for_iOS:
name: iOS用テストビルド
runs-on: macos-latest

steps:
- uses: actions/checkout@v4

- name: Install flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_FVM_VERSION }}
cache: true

- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'


- name: Cache pubspec dependencies
uses: actions/cache@v4
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.packages
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
build-pubspec-
- name: Create symbolic link
run: ln -s ${{ env.FLUTTER_ROOT }} $HOME/work/flutter

- name: Flutter pub get
run: flutter pub get

- name: Run flutter test with coverage
run: flutter test --coverage --coverage-path=~/coverage/lcov.info

- name: Create archive file
run: flutter build ipa --no-tree-shake-icons --release --no-codesign

0 comments on commit 02a723e

Please sign in to comment.