Skip to content
This repository has been archived by the owner on Apr 5, 2021. It is now read-only.

Commit

Permalink
CircleCI 2.0 now supports tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Miller committed Sep 16, 2017
1 parent 9fe0983 commit f5f0665
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ jobs:
command: greenkeeper-lockfile-upload
- deploy:
name: Publish
filters:
tags:
only: /^v[0-9]\+\.[0-9]\+\.[0-9]\+$/
branches:
ignore: /.*/
command: |
export TAG="v$(git log -1 --pretty=%B)"
if echo $TAG | grep "^v[0-9]\+\.[0-9]\+\.[0-9]\+$"; then
npm publish
npm run build:scripts
node .circleci/lib/index.js
else
echo "No tag pushed, skipping deploy"
fi
npm publish
npm run build:scripts
npm run run:scripts
2 changes: 1 addition & 1 deletion .circleci/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ process.on('unhandledRejection', err => {
const {
CIRCLE_PROJECT_USERNAME: OWNER,
CIRCLE_PROJECT_REPONAME: REPO,
CIRCLE_TAG: TAG,
GH_TOKEN: TOKEN,
TAG,
} = process.env

createRelease({
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"test": "mocha --require babel-register",
"build": "rm -rf lib && babel src --out-dir lib --source-maps --copy-files",
"build:scripts": "rm -rf .circleci/lib && babel .circleci/scripts --out-dir .circleci/lib --source-maps",
"run:scripts": "node .circleci/lib/index.js",
"watch": "npm run build -- --watch"
},
"lint-staged": {
Expand Down

0 comments on commit f5f0665

Please sign in to comment.