Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
ci(fix): deploy only on tags V.WHATEVER
Browse files Browse the repository at this point in the history
  • Loading branch information
dianjuar committed Apr 29, 2019
1 parent 5da7593 commit 7dbf8cf
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ var_2: &cache_key v1-dependencies-{{ checksum "yarn.lock" }}

var_3: &workdir /home/circleci/repo

var_4: &only-deploy-tags
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/

version: 2.1

executors:
Expand Down Expand Up @@ -62,6 +69,13 @@ jobs:
- coverage/lcov.info
- reports/test-reporter.xml

test:
executor: my-executor
steps:
- attach_workspace:
at: *workdir
- run: yarn test

build:
executor: my-executor
steps:
Expand Down Expand Up @@ -101,6 +115,7 @@ jobs:

workflows:
version: 2

analize:
jobs:
# Don't do this on tags
Expand Down Expand Up @@ -134,16 +149,22 @@ workflows:

deploy:
jobs:
# Do this only on tags
- checkout_code:
filters:
tags:
only: /^v.*/
branches:
only: master
- checkout_code: *only-deploy-tags
- build:
<<: *only-deploy-tags
requires:
- checkout_code
- linter:
<<: *only-deploy-tags
requires:
- checkout_code
- test:
<<: *only-deploy-tags
requires:
- checkout_code
- deploy:
<<: *only-deploy-tags
requires:
- build
- linter
- test

0 comments on commit 7dbf8cf

Please sign in to comment.