Skip to content

Commit

Permalink
ci: include all abi
Browse files Browse the repository at this point in the history
  • Loading branch information
zyrouge committed Dec 28, 2024
1 parent c0d1193 commit b34cd7c
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 10 deletions.
33 changes: 30 additions & 3 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
chmod +x ./gradlew
./gradlew assembleCanary
./gradlew bundleCanary
find . -name "*.apk"
npm run postbuild
env:
APP_BUILD_TYPE: canary
Expand All @@ -62,8 +61,36 @@ jobs:
- name: 🚀 Upload apk
uses: actions/upload-artifact@v4
with:
name: symphony-v${{ steps.app_version.outputs.version }}-apk
path: ${{ env.OUTPUT_DIR }}/symphony-v${{ steps.app_version.outputs.version }}.apk
name: symphony-v${{ steps.app_version.outputs.version }}-universal-apk
path: ${{ env.OUTPUT_DIR }}/symphony-v${{ steps.app_version.outputs.version }}-universal.apk
if-no-files-found: error

- name: 🚀 Upload apk
uses: actions/upload-artifact@v4
with:
name: symphony-v${{ steps.app_version.outputs.version }}-arm64-v8a-apk
path: ${{ env.OUTPUT_DIR }}/symphony-v${{ steps.app_version.outputs.version }}-arm64-v8a.apk
if-no-files-found: error

- name: 🚀 Upload apk
uses: actions/upload-artifact@v4
with:
name: symphony-v${{ steps.app_version.outputs.version }}-armeabi-v7a-apk
path: ${{ env.OUTPUT_DIR }}/symphony-v${{ steps.app_version.outputs.version }}-armeabi-v7a.apk
if-no-files-found: error

- name: 🚀 Upload apk
uses: actions/upload-artifact@v4
with:
name: symphony-v${{ steps.app_version.outputs.version }}-x86_64-apk
path: ${{ env.OUTPUT_DIR }}/symphony-v${{ steps.app_version.outputs.version }}-x86_64.apk
if-no-files-found: error

- name: 🚀 Upload apk
uses: actions/upload-artifact@v4
with:
name: symphony-v${{ steps.app_version.outputs.version }}-x86-apk
path: ${{ env.OUTPUT_DIR }}/symphony-v${{ steps.app_version.outputs.version }}-x86.apk
if-no-files-found: error

- name: 🚀 Upload aab
Expand Down
2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ android {
abi {
isEnable = true
isUniversalApk = true
reset()
include("arm64-v8a", "armeabi-v7a", "x86_64", "x86")
}
}

Expand Down
20 changes: 13 additions & 7 deletions cli/android/move-outputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,25 @@ import { Paths } from "../helpers/paths";

const APP_BUILD_TYPE = process.env.APP_BUILD_TYPE ?? "release";
const APP_VERSION_NAME = process.env.APP_VERSION_NAME;
const APP_ABI = ["universal", "arm64-v8a", "armeabi-v7a", "x86_64", "x86"];

const main = async () => {
if (typeof APP_VERSION_NAME !== "string") {
throw new Error("Missing environment variable: APP_VERSION_NAME");
}
await fs.ensureDir(Paths.distDir);
await move(
path.join(
Paths.appDir,
`build/outputs/apk/${APP_BUILD_TYPE}/app-${APP_BUILD_TYPE}.apk`,
),
path.join(Paths.distDir, `symphony-v${APP_VERSION_NAME}.apk`),
);
for (const abi of APP_ABI) {
await move(
path.join(
Paths.appDir,
`build/outputs/apk/${APP_BUILD_TYPE}/app-${abi}-${APP_BUILD_TYPE}.apk`,
),
path.join(
Paths.distDir,
`symphony-v${APP_VERSION_NAME}-${abi}.apk`,
),
);
}
await move(
path.join(
Paths.appDir,
Expand Down

0 comments on commit b34cd7c

Please sign in to comment.