Skip to content

Instantly share code, notes, and snippets.

@PaulSec
Created February 18, 2019 20:04
Show Gist options
  • Save PaulSec/535abaafbc682323a5e5858fa7f80b0b to your computer and use it in GitHub Desktop.
Save PaulSec/535abaafbc682323a5e5858fa7f80b0b to your computer and use it in GitHub Desktop.
CircleCI yaml build file
version: 2
jobs:
build:
docker:
- image: beevelop/ionic
steps:
- checkout
- run:
name: Install license
command: (echo y; echo y; echo y; echo y; echo y; echo y) | /opt/android/tools/bin/sdkmanager "platforms;android-27"
- run:
name: Install node modules
command: npm install
- run:
name: Building android
command: ionic cordova build android
- run:
name: Copy artifact
command: cp /root/project/platforms/android/app/build/outputs/apk/debug/app-debug.apk /root/project/app-debug.apk
- persist_to_workspace:
root: .
paths:
- app-debug.apk
- store_artifacts:
path: /root/project/platforms/android/app/build/outputs/apk/debug/app-debug.apk
publish-github-release:
docker:
- image: circleci/golang:1.8
steps:
- attach_workspace:
at: ~/tmp/workspace
- checkout
- run:
name: Publish release on Github
command: |
go get github.com/tcnksm/ghr
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete debug ~/tmp/workspace/app-debug.apk
workflows:
version: 2
build_and_test:
jobs:
- build
- publish-github-release:
requires:
- build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment