image: openjdk:8 pipelines: default: - step: # define the build pipeline for the tag caches: - gradle name: Build and Test script: - bash ./gradlew clean build tags: # add the 'tags' section release-*: # specify the tag - step: # define the build pipeline for the tag caches: - gradle name: Build and Release script: - bash ./gradlew clean build - shopt -s nullglob ; for file in ${BITBUCKET_CLONE_DIR}/build/libs/*.jar ; do curl -X POST --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"${file}" ; done