Skip to content

Commit

Permalink
Merge pull request #37 from identity-com/feature/automatica-versioning
Browse files Browse the repository at this point in the history
CCS-553 automatic versioning after a tag is created
  • Loading branch information
brunocarneiro authored Nov 22, 2018
2 parents 2bddd9b + 1482864 commit 484e530
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ workflows:
- build:
filters:
tags:
only: /^v.*/
only: /^v\d+\.\d+\.\d+-rc.*$/
branches:
ignore: /.*/
- release_rc:
requires:
- build
filters:
tags:
only: /^v\d+\.\d+\.\d+-rc.*$/
branches:
ignore: /.*/
- deploy:
Expand All @@ -24,7 +32,7 @@ workflows:
- build
filters:
tags:
only: /^v.*/
only: /^v\d+\.\d+\.\d+$/
branches:
ignore: /.*/

Expand Down Expand Up @@ -56,6 +64,32 @@ jobs:
- persist_to_workspace:
root: ~/repo
paths: .

release_rc:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo

- run: sudo npm install -g npm
- run: npm ci

- run:
name: git config
command: |
git config credential.helper 'cache --timeout=120'
git config user.email "no-reply@civic.com"
git config user.name "CI Deployer"
git config --global push.default simple
git branch --set-upstream-to origin/$CIRCLE_BRANCH
- run:
name: version
command: npm version patch --git-tag-version false

- run:
name: tag
command: npm run tag
deploy:
<<: *defaults
steps:
Expand Down

0 comments on commit 484e530

Please sign in to comment.