-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from resin-io-modules/versionbot
Move to circle to autopublish and set up versionbot
- Loading branch information
Showing
4 changed files
with
87 additions
and
39 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
version: 2 | ||
|
||
buildSteps: &buildSteps | ||
- checkout | ||
- run: | ||
name: install-npm | ||
command: npm install | ||
- run: | ||
name: test | ||
command: npm test | ||
- persist_to_workspace: | ||
# Persist all job output, so we can (potentially) use it for deploys | ||
root: ../ | ||
paths: | ||
- ./node-* | ||
|
||
jobs: | ||
"node-6": | ||
docker: | ||
- image: circleci/node:6 | ||
working_directory: ~/node-6 | ||
steps: *buildSteps | ||
|
||
"node-8": | ||
docker: | ||
- image: circleci/node:8 | ||
working_directory: ~/node-8 | ||
steps: *buildSteps | ||
|
||
deploy: | ||
# For this to work NPM_TOKEN must be set for the account used for publishing | ||
docker: | ||
- image: circleci/node:6 | ||
steps: | ||
- attach_workspace: | ||
at: $CIRCLE_WORKING_DIRECTORY | ||
- run: | ||
name: Login to npm | ||
command: | | ||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc | ||
npm whoami | ||
- deploy: | ||
name: Deploy to npm | ||
command: npm publish | ||
# Output used for publish is from node 6 build | ||
working_directory: $CIRCLE_WORKING_DIRECTORY/node-6 | ||
|
||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- "node-6": | ||
# Run for all tags (required to allow the deploy to trigger on version tags) | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- "node-8": | ||
# Run for all tags (required to allow the deploy to trigger on version tags) | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- deploy: | ||
# Deploy passing builds if they're tagged with a version | ||
requires: | ||
- "node-6" | ||
- "node-8" | ||
filters: | ||
tags: | ||
only: /^v\d+\.\d+\.\d+$/ | ||
branches: | ||
ignore: /.*/ |