updated version #10
Workflow file for this run
This file contains hidden or 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: Flutter Split APK Build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: "3.32.4" | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Setup environment file | |
| run: | | |
| echo "API_TOKEN=${{ secrets.API_TOKEN }}" >> .env | |
| echo "API_KEY_WEATHERAPI=${{ secrets.API_KEY_WEATHERAPI }}" >> .env | |
| echo "API_KEY_OPENROUTER=${{ secrets.API_KEY_OPENROUTER }}" >> .env | |
| - name: Setup keystore | |
| run: | | |
| echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/weathermaster.jks | |
| - name: Setup key.properties | |
| run: | | |
| echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" > android/key.properties | |
| echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties | |
| echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties | |
| echo "storeFile=app/weathermaster.jks" >> android/key.properties | |
| - name: Build Split APKs | |
| run: flutter build apk --release --split-per-abi | |
| - name: Rename APKs | |
| run: | | |
| VERSION_NAME=$(grep 'version:' pubspec.yaml | awk '{print $2}' | cut -d'+' -f1) | |
| mkdir release_apks | |
| cp build/app/outputs/flutter-apk/app-arm64-v8a-release.apk release_apks/WeatherMaster.${VERSION_NAME}.arm64-v8a.apk | |
| cp build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk release_apks/WeatherMaster.${VERSION_NAME}.armeabi-v7a.apk | |
| cp build/app/outputs/flutter-apk/app-x86_64-release.apk release_apks/WeatherMaster.${VERSION_NAME}.x86_64.apk | |
| - name: Upload APKs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-apks | |
| path: release_apks/ |