Merge pull request #127 from oxters168/js #13
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: Android CI | |
on: | |
push: | |
branches: [ "master" ] | |
paths-ignore: | |
- '**.md' | |
- '.gitignore' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: set up Java 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Validate Gradle wrapper | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Configure Keystore | |
env: | |
KEYSTORE: ${{ secrets.KEYSTORE }} | |
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }} | |
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }} | |
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }} | |
run: | | |
echo "$KEYSTORE" | base64 --decode > app/keystores/keystore | |
echo "storeFile=keystores/keystore" >> app/keystores/keystore.properties | |
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> app/keystores/keystore.properties | |
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> app/keystores/keystore.properties | |
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> app/keystores/keystore.properties | |
- name: Build with Gradle | |
run: ./gradlew :app:bundleRelease-signed | |
- name: Extract APK from Bundle | |
run: | | |
java -jar tools/bundletool-all-1.17.2.jar build-apks --bundle=app/build/outputs/bundle/release-signed/app-release-signed.aab --output=app-release-signed.apks --mode=universal --ks='app/keystores/keystore' --ks-pass='pass:${{ secrets.KEYSTORE_STORE_PASSWORD }}' --ks-key-alias='${{ secrets.KEYSTORE_KEY_ALIAS }}' --key-pass='pass:${{ secrets.KEYSTORE_KEY_PASSWORD }}' | |
unzip app-release-signed.apks | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-release-signed | |
path: ${{ github.workspace }}/universal.apk |