Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

Commit

Permalink
Add release automation (#222)
Browse files Browse the repository at this point in the history
* Add release automation

* Extract aliase

* Add elvis for alias
  • Loading branch information
Vacxe committed Jun 17, 2020
1 parent 97fda29 commit 71b45ca
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
38 changes: 38 additions & 0 deletions .circleci/config.yml
Expand Up @@ -41,6 +41,7 @@ jobs:
- image: circleci/android:api-28
environment:
JVM_OPTS: -Xmx3200m
BINTRAY_ALIAS: SNAPSHOT
steps:
- checkout
- restore_cache:
Expand Down Expand Up @@ -185,13 +186,37 @@ jobs:
name: Run AT
command: sudo gcloud firebase test android run --type instrumentation --app /tmp/artifacts/sample-debug.apk --test /tmp/artifacts/sample-debug-androidTest.apk --device model=Pixel2,version=28,locale=en,orientation=portrait

release-job:
working_directory: ~/code
docker:
- image: circleci/android:api-28
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "sample/build.gradle" }}
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "sample/build.gradle" }}
- run:
name: Publish release
command: ./gradlew build install bintrayUpload

workflows:
version: 2
build-deploy:
jobs:
- build-job
- run-at-approval:
type: approval
filters:
branches:
ignore: master
- automation-assemble:
requires:
- build-job
Expand All @@ -202,17 +227,30 @@ workflows:
requires:
- automation-assemble
- run-at-approval
filters:
branches:
ignore: master
- automation-24api:
requires:
- automation-assemble
- run-at-approval
filters:
branches:
ignore: master
- automation-28api:
requires:
- automation-assemble
- run-at-approval
filters:
branches:
ignore: master
- deploy-job:
requires:
- build-job
filters:
branches:
only: master
- release-job:
filters:
branches:
only: /^release/.+$/
6 changes: 1 addition & 5 deletions buildsystem/dependencies.gradle
Expand Up @@ -40,11 +40,7 @@ ext.libraries = [
]


def alias = System.getenv('BINTRAY_ALIAS')

if (alias == null) {
alias = ''
}
def alias = System.getenv('BINTRAY_ALIAS') ?: ''

def kakaoVersion = new File('buildsystem/version').text.trim() + alias

Expand Down

0 comments on commit 71b45ca

Please sign in to comment.