Skip to content

震源・震度アイコン描画バグの修正 (#579) #38

震源・震度アイコン描画バグの修正 (#579)

震源・震度アイコン描画バグの修正 (#579) #38

Workflow file for this run

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",
"android-aab",
]
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
FLUTTER_VERSION:
FLUTTER_CHANNEL:
FLUTTER_HOME:
CI_ACTION_REF_NAME:
timeout-minutes: 45
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: 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: Install Melos
uses: bluefireteam/melos-action@v2
- name: Flutter dependencies install
run: flutter pub get
- name: build_runner
run: |
echo '${{ secrets.ENV }}' | base64 -d > .env
ln -s $FLUTTER_ROOT .fvm/flutter_sdk
melos generate
- name: Accept Android License
run: yes | flutter doctor --android-licenses
- name: Extract Environment Variables
run: |
echo '${{ secrets.SIGNING_KEY }}' | base64 -d > android/app/key.jks
echo '${{ secrets.FIREBASE_ANDROID }}' | base64 -d > android/app/google-services.json
echo '${{ secrets.KEY_PROPERTIES }}' | base64 -d > android/key.properties
flutter build appbundle --release
- name: Build APK
if: ${{ matrix.target }} != "android-all" && ${{ matrix.target }} != "android-aab"
run: flutter build apk --release --target-platform=${{ matrix.target }}
- name: Build APK (All Targets)
if: ${{ matrix.target }} == "android-all"
run: flutter build apk --release
- name: Build AAB
if: ${{ matrix.target }} == "android-aab"
run: flutter build appbundle --release
- name: Upload artifact
uses: actions/[email protected]
if: ${{ matrix.target }} != "android-aab"
with:
name: EQMonitor-${{ matrix.target }}.apk
path: build/app/outputs/flutter-apk/app-release.apk
- name: Upload artifact (AAB)
uses: actions/[email protected]
if: ${{ matrix.target }} == "android-aab"
with:
name: EQMonitor-${{ matrix.target }}.aab
path: build/app/outputs/bundle/release/app-release.aab
- 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
- name: Release (AAB)
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && ${{ matrix.target }} == "android-aab"
with:
files: EQMonitor-${{ matrix.target }}.aab
name: v${{ env.CI_ACTION_REF_NAME }}
draft: true
#-- 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 }}