Skip to content

Try to generate independent products #24

Try to generate independent products

Try to generate independent products #24

Workflow file for this run

name: Build APK
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
environment: buildapk
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Build with Gradle
run: bash build.sh
- name: Align and Sign Release
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
if: ${{ env.SIGNING_KEY != null }}
continue-on-error: true
uses: noriban/sign-android-release@v5.1
id: sign_app
with:
releaseDirectory: release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Get file name
run: |
echo "FILE0=$(basename ${{ steps.sign_app.outputs.signedReleaseFile0 }} .apk)" >> "$GITHUB_ENV
echo "FILE1=$(basename ${{ steps.sign_app.outputs.signedReleaseFile1 }} .apk)" >> "$GITHUB_ENV
- name: Upload Artifact0
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
if: ${{ steps.sign_app.outcome == 'success' && env.SIGNING_KEY != null }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.FILE0 }}
path: ${{ steps.sign_app.outputs.signedReleaseFile0 }}
- name: Upload Artifact1
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
if: ${{ steps.sign_app.outcome == 'success' && env.SIGNING_KEY != null }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.FILE1 }}
path: ${{ steps.sign_app.outputs.signedReleaseFile1 }}