fix ci for release #14
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: Build Manager | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build-apd: | |
strategy: | |
matrix: | |
include: | |
- target: aarch64-linux-android | |
uses: ./.github/workflows/apd.yml | |
with: | |
target: ${{ matrix.target }} | |
build-manager: | |
needs: build-apd | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Write key | |
if: ${{ ( github.event_name != 'pull_request' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }} | |
run: | | |
if [ ! -z "${{ secrets.KEYSTORE }}" ]; then | |
echo KEYSTORE_PASSWORD='${{ secrets.KEYSTORE_PASSWORD }}' >> gradle.properties | |
echo KEY_ALIAS='${{ secrets.KEY_ALIAS }}' >> gradle.properties | |
echo KEY_PASSWORD='${{ secrets.KEY_PASSWORD }}' >> gradle.properties | |
echo KEYSTORE_FILE='../key.jks' >> gradle.properties | |
echo ${{ secrets.KEYSTORE }} | base64 --decode > key.jks | |
fi | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-home-cache-cleanup: true | |
- name: Download arm64 apd | |
uses: actions/download-artifact@v3 | |
with: | |
name: apd-aarch64-linux-android | |
path: app/libs/arm64-v8a/ | |
- name: test | |
run: | | |
mv app/libs/arm64-v8a/aarch64-linux-android/release/apd app/libs/arm64-v8a/libapd.so | |
rm -rf app/libs/arm64-v8a/aarch64-linux-android/ | |
- name: Build with Gradle | |
run: | | |
echo 'org.gradle.parallel=true' >> gradle.properties | |
echo 'org.gradle.vfs.watch=true' >> gradle.properties | |
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties | |
echo 'android.native.buildOutput=verbose' >> gradle.properties | |
sed -i 's/org.gradle.configuration-cache=true//g' gradle.properties | |
./gradlew clean assembleRelease | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: APatch | |
path: app/build/outputs/apk/release/*.apk |