Skip to content

Commit

Permalink
Change from gradle build to flutter build
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasLehnfeld committed Oct 9, 2021
1 parent 00a83f3 commit 094db69
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/actions/flutter-android-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,50 +44,60 @@ runs:
NETZPOLITIK_KEY_PWD: ${{ inputs.key-pwd }}
NETZPOLITIK_KEYSTORE_PWD: ${{ inputs.keystore-pwd }}
run: |
cd android
if [ ${{ inputs.release }} = "true" ]; then
if [ ${{ inputs.build-type }} = "apk" ] || [ ${{ inputs.build-type }} = "both" ]; then
./gradlew assembleRelease
flutter build apk || true
fi
if [ ${{ inputs.build-type }} = "aab" ] || [ ${{ inputs.build-type }} = "both" ]; then
./gradlew bundleRelease
flutter build appbundle || true
fi
else
if [ ${{ inputs.build-type }} = "apk" ] || [ ${{ inputs.build-type }} = "both" ]; then
./gradlew assembleDebug
flutter build apk --debug || true
fi
if [ ${{ inputs.build-type }} = "aab" ] || [ ${{ inputs.build-type }} = "both" ]; then
./gradlew bundleDebug
flutter build appbundle --debug || true
fi
fi
cd ..
shell: bash
- run: |
if [ ${{ inputs.release }} = "true" ]; then
if [ ${{ inputs.build-type }} = "apk" ] || [ ${{ inputs.build-type }} = "both" ]; then
APK_PATH=build/app/outputs/apk/release/`ls build/app/outputs/apk/release | grep apk`
if [ ! -f $APK_PATH ]; then
exit 1
fi
echo "::set-output name=apk-path::$(echo $APK_PATH)"
fi
if [ ${{ inputs.build-type }} = "aab" ] || [ ${{ inputs.build-type }} = "both" ]; then
AAB_PATH=build/app/outputs/bundle/release/`ls build/app/outputs/bundle/release | grep aab`
if [ ! -f $AAB_PATH ]; then
exit 1
fi
echo "::set-output name=aab-path::$(echo $AAB_PATH)"
fi
else
if [ ${{ inputs.build-type }} = "apk" ] || [ ${{ inputs.build-type }} = "both" ]; then
APK_PATH=build/app/outputs/apk/debug/`ls build/app/outputs/apk/debug | grep apk`
if [ ! -f $APK_PATH ]; then
exit 1
fi
echo "::set-output name=apk-path::$(echo $APK_PATH)"
fi
if [ ${{ inputs.build-type }} = "aab" ] || [ ${{ inputs.build-type }} = "both" ]; then
AAB_PATH=build/app/outputs/bundle/debug/`ls build/app/outputs/bundle/debug | grep aab`
if [ ! -f $AAB_PATH ]; then
exit 1
fi
echo "::set-output name=aab-path::$(echo $AAB_PATH)"
fi
fi
Expand Down

0 comments on commit 094db69

Please sign in to comment.