diff --git a/.circleci/config.yml b/.circleci/config.yml index 483aba1..ad80272 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,9 +23,9 @@ jobs: - run: name: Publish on Maven command: | - VERSION=$(git tag --points-at HEAD) # Get current tag if any + echo $CIRCLE_TAG # Check correct tag format, strip leading "v" and publish - if [[ $VERSION =~ ^v(.*)$ ]]; then + if [[ $CIRCLE_TAG =~ ^v(.*)$ ]]; then VERSION=${BASH_REMATCH[1]} ./gradlew bintrayUpload -PgitVersion=$VERSION fi @@ -33,4 +33,14 @@ jobs: path: build/reports destination: reports - store_test_results: - path: build/test-results \ No newline at end of file + path: build/test-results + +workflows: + version: 2 + build-workflow: + jobs: + - build: + filters: + tags: + only: /^v.*/ + \ No newline at end of file