地震履歴詳細画面で震央表示が消える問題を解消 (#378) #35
Workflow file for this run
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: Tag Release | |
on: | |
push: | |
tags: | |
- "v*" | |
workflow_dispatch: | |
jobs: | |
release-android: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
target: ["android-arm", "android-arm64", "android-x64", "android-all"] | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v2 | |
- 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: pocket-apps/action-setup-firebase@v2 | |
with: | |
firebase-token: ${{ secrets.FIREBASE_TOKEN }} | |
# https://github.com/kuhnroyal/flutter-fvm-config-action | |
- name: Fetch flutter config | |
uses: kuhnroyal/flutter-fvm-config-action@v1 | |
# https://github.com/subosito/flutter-action | |
- name: Set up flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ env.FLUTTER_VERSION }} | |
channel: ${{ env.FLUTTER_CHANNEL }} | |
cache: true | |
cache-key: ${{ env.FLUTTER_VERSION }}-${{ env.FLUTTER_CHANNEL }} | |
- name: Flutter version | |
run: flutter --version | |
- name: Cache pubspec dependencies | |
uses: actions/cache@v2 | |
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: Cache build runner | |
uses: actions/cache@v2 | |
with: | |
path: | | |
**/.dart_tool/build | |
key: build-runner-${{ hashFiles('**/asset_graph.json') }}-${{ hashFiles('**/pubspec.lock') }} | |
restore-keys: build-runner- | |
- name: Flutter dependencies install | |
run: flutter pub get | |
- name: Install Melos | |
run: dart pub global activate melos && melos bootstrap | |
- name: build_runner | |
run: | | |
echo '${{ secrets.ENV }}' | base64 -d > .env | |
melos generate | |
- name: Generate LauncherIcon | |
run: flutter pub run flutter_launcher_icons:main | |
#- name: Generate NativeSplash | |
# run: flutter pub run flutter_native_splash:create | |
- name: Accept Android License | |
run: yes | flutter doctor --android-licenses | |
- name: Build apk | |
run: | | |
echo '${{ secrets.SIGNING_KEY }}' | base64 -d > android/app/key.jks | |
echo '${{ secrets.FIREBASE_ANDROID }}' | base64 -d > android/app/google-services.json | |
export KEYSTORE_PASSWORD='${{ secrets.KEYSTORE_PASSWORD }}' | |
export KEY_ALIAS='${{ secrets.KEY_ALIAS }}' | |
export KEY_PASSWORD='${{ secrets.KEY_PASSWORD }}' | |
# targetがallの場合は、全てのtargetでビルドする | |
if [ ${{ matrix.target }} = "android-all" ]; then | |
flutter build apk \ | |
--release \ | |
--obfuscate \ | |
--split-debug-info=obfuscate/android | |
else | |
flutter build apk \ | |
--release \ | |
--obfuscate \ | |
--split-debug-info=obfuscate/android \ | |
--target-platform=${{ matrix.target }} | |
fi | |
cp build/app/outputs/flutter-apk/app-release.apk EQMonitor-${{ matrix.target }}.apk | |
env: | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
ALIAS: ${{ secrets.ALIAS }} | |
KEY_PATH: key.jks | |
target-platform: ${{ matrix.target }} | |
- name: Upload artifact | |
uses: actions/[email protected] | |
with: | |
name: EQMonitor-${{ matrix.target }}.apk | |
path: build/app/outputs/flutter-apk/app-release.apk | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: EQMonitor-${{ matrix.target }}.apk | |
name: v${{ env.CI_ACTION_REF_NAME }} | |
draft: true | |
prerelease: true | |
- name: Upload obfuscate | |
run: | | |
firebase crashlytics:symbols:upload --app=1:179553945248:android:11ffcfb483c098ad6fabc5 obfuscate/android | |
#-- Slack通知 --# | |
# 成功 | |
- name: Slack Notification on Success | |
if: ${{ success() }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_TITLE: Deploy Success | |
SLACK_COLOR: good | |
SLACK_ICON: https://raw.githubusercontent.com/EQMonitor/EQMonitor/main/assets/icon.png | |
SLACK_USERNAME: EQMonitor | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | |
# 失敗 | |
- name: Slack Notification on Failure | |
if: ${{ failure() }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_TITLE: Deploy Failure | |
SLACK_COLOR: danger | |
SLACK_ICON: https://raw.githubusercontent.com/EQMonitor/EQMonitor/main/assets/icon.png | |
SLACK_USERNAME: EQMonitor | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} |