1.0.0-os #1
Workflow file for this run
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 AAB | |
on: | |
release: | |
types: [created] | |
# paths-ignore: | |
# - 'pubspec.yaml' #The paths-ignore will prevent the workflow from being triggered when only the pubspec.yaml file is changed. | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: env create | |
run: echo "VERSION_NUMBER=$GITHUB_REF_NAME" >> $GITHUB_ENV | |
# - name: tagcreation | |
# run: | | |
# git tag ${{ env.VERSION_NUMBER}} | |
# git push origin ${{ env.VERSION_NUMBER}} | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.22.0' | |
cache: true | |
- name: Flutter clean | |
run: flutter clean | |
- name: Install Dependencies | |
run: flutter pub get | |
- name: Decode android/upload-keystore.jks | |
run: echo "${{ secrets.JKS_UPLOAD_SECRET }}" | base64 --decode > android/app/upload-keystore.jks | |
- name: Decode android/key.properties | |
run: echo "${{ secrets.KEY_PROPERTIES_PROD }}" | base64 --decode > android/key.properties | |
- name: Build APPBUNDLE | |
run: flutter build appbundle --release --build-name ${{ env.VERSION_NUMBER}} --build-number ${{ github.run_number }} | |
- name: Build Android APK | |
run: flutter build apk --release --build-name ${{ env.VERSION_NUMBER}} --build-number ${{ github.run_number }} --verbose | |
- name: Copy the file | |
run: cp ./build/app/outputs/flutter-apk/app-release.apk ./build/app/outputs/flutter-apk/app-release-${{ env.VERSION_NUMBER}}.apk | |
- name: Copy the file | |
run: cp ./build/app/outputs/bundle/release/app-release.aab ./build/app/outputs/bundle/release/app-release-${{ env.VERSION_NUMBER}}.aab | |
- name: upload artifact to App Center | |
uses: wzieba/AppCenter-Github-Action@v1 | |
with: | |
appName: stg-radar-mobility/eyecare4all | |
token: ${{secrets.APP_CENTER_TOKEN}} | |
group: Collaborators | |
file: ./build/app/outputs/flutter-apk/app-release-${{ env.VERSION_NUMBER}}.apk | |
notifyTesters: true | |
debug: false | |
- name: Upload AAB | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-release-${{ env.VERSION_NUMBER}} | |
path: ./build/app/outputs/bundle/release/app-release-${{ env.VERSION_NUMBER}}.aab | |
retention-days: 10 |