Skip to content

Update github action #128

Update github action

Update github action #128

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
fetch-tags: true
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3.5.0
- name: Build with Gradle
run:
echo 'org.gradle.parallel=true' >> gradle.properties
echo 'org.gradle.vfs.watch=true' >> gradle.properties
echo 'qauxv.override.ninja.path=/usr/bin/ninja' >> local.properties
sed -i 's/org.gradle.configuration-cache=true//g' gradle.properties
echo 'buildCache { local { removeUnusedEntriesAfterDays = 1 } }' >> settings.gradle.kts
echo ${{ secrets.SIGN_KEYSTORE_BASE64 }} | base64 -d > keystore.jks
./gradlew :app:synthesizeDistReleaseApksCI :app:extractReleaseNativeDebugMetadata
ccache -s
echo "FILE=$(find build/libs -name '*.jar')" >> $GITHUB_ENV
env:
KEYSTORE_PATH: "../keystore.jks"
KEYSTORE_PASSWORD: ${{ secrets.SIGN_KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.SIGN_ALIAS }}
KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }}
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.6.2
with:
path: ${{ env.FILE }}
name: ifw-pre-${{ github.event.head_commit.id }}
- name: Download a Build Artifact
uses: actions/download-artifact@v4.2.1
with:
path: artifacts
- name: Release
run: |
export file=$(find artifacts -name "*.jar")