diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index f6c78736..5d96f78d 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -7,7 +7,7 @@ on: type: string jobs: - build: + build-apk: runs-on: ubuntu-latest steps: - name: Checkout code @@ -54,11 +54,49 @@ jobs: with: name: maid-android-apk path: build/app/outputs/apk/release - + + build-aab: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'adopt' + + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ inputs.flutter_version }} + + - name: Decode Keystore File + env: + KEYSTORE: ${{ secrets.KEYSTORE }} + run: echo "$KEYSTORE" | base64 --decode > android/app/key.jks + + - name: Create key.properties + run: | + echo "storeFile=key.jks" > android/key.properties + echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> android/key.properties + echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties + echo "releasePassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties + echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties + echo "releaseAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties + + - name: Setup Flutter + run: | + flutter config --no-analytics + flutter pub get + - name: Build appbundle run: | flutter build appbundle - + - name: Upload AAB uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 2f28e4d7..afa1de33 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -6,7 +6,7 @@ on: required: true type: string jobs: - build: + build-windows: runs-on: windows-latest steps: - name: Checkout code