Merge pull request #575 from KazumaProject/fix/cursor-move-left #381
Workflow file for this run
This file contains hidden or 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: Android Release CI | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Set up Android SDK | |
| uses: android-actions/setup-android@v3 | |
| with: | |
| log-accepted-android-sdk-licenses: true | |
| - name: Cache Gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Decode JKS from Base64 | |
| run: | | |
| echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > my-release-key.jks | |
| - name: Add signing info to local.properties | |
| run: | | |
| if [ ! -f local.properties ]; then | |
| touch local.properties | |
| fi | |
| KEYSTORE_PATH=$(pwd)/my-release-key.jks | |
| echo "# --- SigningConfig for CI ---" >> local.properties | |
| echo "KEYSTORE_FILE=$KEYSTORE_PATH" >> local.properties | |
| echo "KEYSTORE_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }}" >> local.properties | |
| echo "KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> local.properties | |
| echo "KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}" >> local.properties | |
| # -PsplitApks を指定して分割APKを作成します | |
| - name: Build Signed Release APK | |
| run: ./gradlew clean assembleRelease -PsplitApks --stacktrace | |
| # 複数のAPKをそのままアップロードします | |
| - name: Create Release and Upload APK | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| generate_release_notes: true | |
| # 分割された全てのAPKをアップロード (例: app-arm64-v8a-release.apk, app-x86_64-release.apk) | |
| files: app/build/outputs/apk/release/*.apk | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |