Created
February 14, 2023 21:38
-
-
Save james2doyle/8d359ec98cd74df7cc35f5236f5897f6 to your computer and use it in GitHub Desktop.
Bitbucket pipeline file for building Android app apk files with Flutter
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
# You can run the pipeline image locally using the following command: | |
# docker run --platform linux/amd64 -it --volume="$PWD:/app" --workdir="/app" --entrypoint=/bin/bash avetkhov/flutter:latest | |
definitions: | |
caches: | |
pub: ~/.pub-cache # $PUB_CACHE default value | |
flutter: /opt/flutter # flutter sdk path | |
steps: | |
- step: &flutter-run | |
name: Flutter Test | |
image: avetkhov/flutter:latest | |
caches: | |
- pub | |
- flutter | |
script: | |
- flutter channel master | |
- flutter upgrade --force | |
- flutter precache | |
- flutter pub get | |
- flutter test | |
pipelines: | |
default: | |
- step: *flutter-run | |
- step: | |
name: Build Android | |
image: avetkhov/flutter:latest | |
caches: | |
- pub | |
- flutter | |
script: | |
- flutter channel master | |
- flutter upgrade --force | |
- flutter precache | |
- flutter pub get | |
- flutter build apk --debug | |
artifacts: | |
- build/app/outputs/flutter-apk/** | |
- step: | |
name: Create Download | |
deployment: Test | |
script: | |
- pipe: atlassian/bitbucket-upload-file:0.3.4 | |
variables: | |
BITBUCKET_USERNAME: $BITBUCKET_USERNAME | |
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD # needs Repo Read and Write permission | |
# uploaded to https://bitbucket.org/{repo_org}/{repo_name}/downloads/ | |
FILENAME: "build/app/outputs/flutter-apk/*.apk" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment