version: 2 jobs: build: docker: - image: openjdk:8 working_directory: ~/embulk-filter-hash steps: - checkout - restore_cache: keys: - v1-gradle-{{ checksum "gradle/dependency-locks/compileClasspath.lockfile" }}-{{ checksum "gradle/dependency-locks/testCompileClasspath.lockfile" }} - v1-gradle- - run: ./gradlew check --info - run: name: Save test results command: | mkdir -p ~/junit/ find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \; when: always - store_test_results: path: ~/junit - store_artifacts: path: ~/junit - save_cache: paths: - "~/.gradle" - "~/.m2" key: v1-gradle-{{ checksum "gradle/dependency-locks/compileClasspath.lockfile" }}-{{ checksum "gradle/dependency-locks/testCompileClasspath.lockfile" }} - deploy: name: Push Gem to RubyGems.org and bump up command: | if [ "${CIRCLE_BRANCH}" == "release" ]; then mkdir -p ~/.gem curl -f -u ${RUBYGEMS_USER}:${RUBYGEMS_PASSWORD} https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials git config --global user.email "shiketaudonko41@gmail.com" git config --global user.name "kamatama41" git checkout master git reset --hard origin/master ./gradlew release -Prelease.useAutomaticVersion=true fi