Skip to content

Commit

Permalink
Merge pull request #227 from stellar/tamir/circleci
Browse files Browse the repository at this point in the history
Add circle ci config
  • Loading branch information
tamirms authored Jul 2, 2019
2 parents b13a09e + 1a55eae commit 880bc34
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 17 deletions.
64 changes: 64 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
jobs:
test:
docker:
- image: circleci/openjdk:8
steps:
- checkout
- run: ./gradlew check
shadow_jar:
docker:
- image: circleci/openjdk:8
steps:
- checkout
- run: ./gradlew shadowJar
- persist_to_workspace:
root: build
paths:
- libs/stellar-sdk.jar
deploy:
docker:
- image: cibuilds/github:0.10
steps:
- attach_workspace:
at: ./build
- run:
name: "Publish Release on GitHub"
command: |
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${CIRCLE_TAG} ./build/libs
after_deploy:
docker:
- image: circleci/openjdk:8
steps:
- checkout
- run: ./after_deploy.sh

workflows:
version: 2
test-and-deploy:
jobs:
- test
- shadow_jar:
requires:
- test
filters:
tags:
only: /.*/
branches:
ignore: /.*/
- deploy:
requires:
- shadow_jar
filters:
tags:
only: /.*/
branches:
ignore: /.*/
- after_deploy:
requires:
- deploy
filters:
tags:
only: /.*/
branches:
ignore: /.*/
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion after_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ rm -rf javadoc/* # Remove all files without hidden (.git)
javadoc -public -splitindex -windowtitle "java-stellar-sdk documentation" -d ./javadoc -sourcepath ./src/main/java/ -subpackages org.stellar.sdk -exclude org.stellar.sdk.xdr
cd javadoc
git add .
git commit -m $TRAVIS_TAG
git commit -m $CIRCLE_TAG
git push origin gh-pages

0 comments on commit 880bc34

Please sign in to comment.