diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..ec5aea6d4 --- /dev/null +++ b/.circleci/config.yml @@ -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: /.*/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 26d0778c1..000000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: java -env: - global: - # GITHUB_TOKEN - - secure: "sLQlgb6CU0tHrF4tXwJno/Xqme+mmgu74Qd9H9KuJexfb4OyYw593Q6tn3wMWrImyZlTmcbum1EYIFsgJGhCn8kMuF6PuOywGFPC44LooyBL9Pg4RTYeigQaAEwV4Nfofb7wf7Od09WVbwrb2+e25ya9b7DqtMEVAeFCXqVeGWtudHk+yxyG6N9usA3zvwMGd/Ku3s2WPlviNbGyd0h2aRBuhiAZcgC8OPSgwZNXm2nFgRs/GSxo40LeUSnoO8ilJ4Mp4JbGswXjacj21RGmVCXtwhIOJsy4dk8I0RApv04fCq9/e37K+N0K8Zf4l+n7DyfJzXAT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feVwuaq+IqlzmJitt89ptrRcNDr2Dt5xURaqBQu/5Y= - file: "./build/libs/stellar-sdk.jar" - skip_cleanup: true - on: - repo: stellar/java-stellar-sdk - tags: true diff --git a/after_deploy.sh b/after_deploy.sh index 2563e58c9..df47ec0fe 100755 --- a/after_deploy.sh +++ b/after_deploy.sh @@ -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