Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: split Android build job #298

Merged
merged 1 commit into from
Jul 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 43 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
echo version=$(grep flutter .fvmrc | cut -d ":" -f2|cut -d "\"" -f2)
>> $GITHUB_OUTPUT

build-android:
build-apk:
runs-on: ubuntu-latest

needs: get-flutter-version
Expand Down Expand Up @@ -104,20 +104,58 @@ jobs:
${{ env.APK_BUILD_DIR }}/build/app/outputs/apk/release/aria-${{ github.ref_name }}-x86_64.apk
draft: true

build-appbundle:
runs-on: ubuntu-latest

needs: get-flutter-version

steps:
- uses: actions/checkout@v4

- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ needs.get-flutter-version.outputs.flutter-version }}
cache: true

- name: Get dependencies
run: flutter pub get

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
cache: gradle

- name: Dump keystore
uses: timheuer/base64-to-file@v1
with:
fileName: upload.keystore
fileDir: android/app/
encodedString: ${{ secrets.UPLOAD_KEYSTORE }}

- name: Get build number
id: get-build-number
run: >
echo build-number=$(grep version pubspec.yaml | cut -d "+" -f2)
>> $GITHUB_OUTPUT

- name: Build App Bundle
working-directory: ${{ env.APK_BUILD_DIR }}
env:
HOME: /tmp
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
run: flutter build appbundle
run: >
flutter build appbundle
--build-number ${{ steps.get-build-number.outputs.build-number }}3

- name: Upload App Bundle
uses: actions/upload-artifact@v4
with:
name: App Bundle
path: ${{ env.APK_BUILD_DIR }}/build/app/outputs/bundle/release/app-release.aab
path: build/app/outputs/bundle/release/app-release.aab

build-ios:
runs-on: macos-latest
Expand Down
Loading