Skip to content

Instantly share code, notes, and snippets.

@nilsreichardt
Last active January 30, 2022 20:36
Show Gist options
  • Save nilsreichardt/e0c0376a3c14c26b3fd5f7ef8383dec2 to your computer and use it in GitHub Desktop.
Save nilsreichardt/e0c0376a3c14c26b3fd5f7ef8383dec2 to your computer and use it in GitHub Desktop.
Setup a simple workflow for building app previews articel
workflows:
app-preview:
name: App Preview
# All available instance types:
# https://docs.codemagic.io/yaml/yaml-getting-started/#instance-type
instance_type: mac_pro
max_build_duration: 75
environment:
flutter: v2.8.1
when:
# We skipping the app preview for draft pull request to save Codemagic
# build seats.
condition: event.pull_request.draft == false
triggering:
events:
- pull_request
# We canceling the previous build, so we save Codemagic build seats. This
# means, if we first push commit "A" and after a few minutes commit "B" to
# the pull request, will be the build for commit "A" canceled.
cancel_previous_builds: true
scripts:
- name: Install dependencies
script: flutter pub get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment