Skip to content

Check for English Repeat button in JP for TranslateFGO (#1660) #2124

Check for English Repeat button in JP for TranslateFGO (#1660)

Check for English Repeat button in JP for TranslateFGO (#1660) #2124

Workflow file for this run

name: CI
on:
pull_request:
paths-ignore:
- '.idea/**'
- '.github/ISSUE_TEMPLATE/**'
- '.gitattributes'
- '.gitignore'
- '*.md'
- 'LICENSE'
- 'custom-game-area/**'
push:
branches:
- master
tags:
- 'v*'
paths-ignore:
- '.idea/**'
- '.github/**'
- '.gitattributes'
- '.gitignore'
- '*.md'
- 'LICENSE'
- 'renovate.json'
- 'custom-game-area/**'
- 'FUNDING.yml'
workflow_dispatch:
inputs:
release-canary:
description: 'Release canary or not'
default: 'true'
required: true
release-playstore:
description: 'Release play store version or not'
default: 'true'
required: true
env:
JAVA_VERSION: 17
JAVA_DISTRO: 'temurin'
jobs:
build:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master' || inputs.release-canary != 'false'
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
cache: 'gradle'
- name: Determine Version Name
shell: bash
run: |
VERSION_CODE=${{ github.run_number }}
VERSION_NAME=${{ github.run_number }}
if [[ ${{ github.ref }} == refs/tags/* ]]; then
VERSION_NAME = ${{ github.ref_name }}
fi
echo "FGA_VERSION_CODE=$VERSION_CODE" >>${GITHUB_ENV}
echo "FGA_VERSION_NAME=$VERSION_NAME" >>${GITHUB_ENV}
- name: Build Android Package
run: ./gradlew assembleCi --scan --parallel --no-daemon
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: apk
path: app/build/outputs/apk/ci/app-ci.apk
- name: Upload De-obfuscation mapping file
uses: actions/upload-artifact@v3
with:
name: mapping-ci
path: app/build/outputs/mapping/ci/mapping.txt
# Release master branch
canary:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@v3
with:
name: apk
- name: Rename apk
run: mv app-ci.apk io.github.fate_grand_automata.apk
- id: create_release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "canary"
prerelease: true
title: 'FGA canary-${{ github.run_number }}'
files: |
*.apk
play_store:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && inputs.release-playstore != 'false'
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
cache: 'gradle'
- name: Determine Version Name
shell: bash
run: |
VERSION_CODE=${{ github.run_number }}
VERSION_NAME=${{ github.run_number }}
if [[ ${{ github.ref }} == refs/tags/* ]]; then
VERSION_NAME = ${{ github.ref_name }}
fi
echo "FGA_VERSION_CODE=$VERSION_CODE" >>${GITHUB_ENV}
echo "FGA_VERSION_NAME=$VERSION_NAME" >>${GITHUB_ENV}
- name: Decrypt keystore (GPG)
env:
GPG_KEYSTORE: ${{ secrets.GPG_KEYSTORE }}
working-directory: ./app
run: gpg --quiet --batch --yes --decrypt --passphrase="$GPG_KEYSTORE" --output fgautomata.keystore fgautomata.keystore.gpg
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- name: Deploy to Play Store
uses: maierj/[email protected]
with:
lane: 'deploy'
env:
SUPPLY_JSON_KEY_DATA: ${{ secrets.SERVICE_ACCOUNT_NEW_APP }}
KEYSTORE_PASS: ${{ secrets.KEYSTORE_PASS }}
- name: Upload Bundle
uses: actions/upload-artifact@v3
with:
name: bundle
path: app/build/outputs/bundle/release/app-release.aab
- name: Upload De-obfuscation mapping file
uses: actions/upload-artifact@v3
with:
name: mapping-release
path: app/build/outputs/mapping/release/mapping.txt