Skip to content

Instantly share code, notes, and snippets.

@sp4wna1
Created October 1, 2018 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sp4wna1/317e1adb6fd4c41c99ba92f4008df757 to your computer and use it in GitHub Desktop.
Save sp4wna1/317e1adb6fd4c41c99ba92f4008df757 to your computer and use it in GitHub Desktop.
---
format_version: '6'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: android
trigger_map:
- push_branch: "*"
workflow: primary
- pull_request_source_branch: "*"
workflow: primary
workflows:
deploy:
description: |
## To run this workflow
If you want to run this workflow manually:
1. Open the app's build list page
2. Click on **[Start/Schedule a Build]** button
3. Select **deploy** in **Workflow** dropdown input
4. Click **[Start Build]** button
Or if you need this workflow to be started by a GIT event:
1. Click on **Triggers** tab
2. Setup your desired event (push/tag/pull) and select **deploy** workflow
3. Click on **[Done]** and then **[Save]** buttons
The next change in your repository that matches any of your trigger map event will start **deploy** workflow.
steps:
- activate-ssh-key@4.0.3:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@4.0.11: {}
- cache-pull@2.0.1: {}
- script@1.1.5:
title: Do anything with Script step
- install-missing-android-tools@2.2.0:
inputs:
- gradlew_path: "$PROJECT_LOCATION/gradlew"
- change-android-versioncode-and-versionname@1.1.1:
inputs:
- build_gradle_path: "$PROJECT_LOCATION/$MODULE/build.gradle"
- android-lint@0.9.4:
inputs:
- project_location: "$PROJECT_LOCATION"
- module: "$MODULE"
- variant: "$TEST_VARIANT"
- android-unit-test@0.9.3:
inputs:
- project_location: "$PROJECT_LOCATION"
- module: "$MODULE"
- variant: "$TEST_VARIANT"
- android-build@0.9.5:
inputs:
- project_location: "$PROJECT_LOCATION"
- module: "$MODULE"
- variant: "$BUILD_VARIANT"
- sign-apk@1.2.3:
run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}'
- deploy-to-bitrise-io@1.3.15: {}
- cache-push@2.0.5: {}
primary:
steps:
- activate-ssh-key@4.0.3:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@4.0.11: {}
- cache-pull@2.0.1: {}
- script@1.1.5:
title: Do anything with Script step
- install-missing-android-tools@2.2.0:
inputs:
- gradlew_path: "$PROJECT_LOCATION/gradlew"
- android-lint@0.9.4:
inputs:
- project_location: "$PROJECT_LOCATION"
- module: "$MODULE"
- variant: "$TEST_VARIANT"
- android-unit-test@0.9.3:
inputs:
- project_location: "$PROJECT_LOCATION"
- module: "$MODULE"
- variant: "$TEST_VARIANT"
- deploy-to-bitrise-io@1.3.15: {}
- cache-push@2.0.5: {}
app:
envs:
- opts:
is_expand: false
PROJECT_LOCATION: "."
- opts:
is_expand: false
MODULE: app
- opts:
is_expand: false
BUILD_VARIANT: Debug
- opts:
is_expand: false
TEST_VARIANT: Debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment