Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
189 additions
and
26 deletions.
There are no files selected for viewing
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,189 @@ | ||
defaults: &defaults | ||
working_directory: ~/repo | ||
docker: | ||
- image: circleci/node:8.0 | ||
|
||
whitelist: &whitelist | ||
paths: | ||
- .npmignore | ||
- coverage/* | ||
- dist/* | ||
- node_modules/* | ||
- src/* | ||
- test/* | ||
- CODE_OF_CONDUCT.md | ||
- LICENSE.md | ||
- package.json | ||
- README.md | ||
- tsconfig.json | ||
- tslint.json | ||
version: 2 | ||
jobs: | ||
checkout: | ||
<<: *defaults | ||
|
||
steps: | ||
- checkout | ||
|
||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
- v1-dependencies- | ||
|
||
- run: | ||
name: Install Dependencies | ||
command: yarn install | ||
|
||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "package.json" }} | ||
|
||
- persist_to_workspace: | ||
root: ~/repo | ||
<<: *whitelist | ||
|
||
lint: | ||
<<: *defaults | ||
|
||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
|
||
- run: | ||
name: Lint TypeScript code | ||
command: yarn lint | ||
|
||
test: | ||
<<: *defaults | ||
|
||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
|
||
- run: | ||
name: Test TypeScript code | ||
command: yarn test:cover | ||
|
||
- persist_to_workspace: | ||
root: ~/repo | ||
<<: *whitelist | ||
|
||
coveralls: | ||
<<: *defaults | ||
|
||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
|
||
- run: | ||
name: Submit coverage report to Coveralls.io | ||
command: yarn coveralls | ||
|
||
build: | ||
<<: *defaults | ||
|
||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
|
||
- run: | ||
name: Build TypeScript code | ||
command: yarn build | ||
|
||
- persist_to_workspace: | ||
root: ~/repo | ||
<<: *whitelist | ||
|
||
deploy: | ||
<<: *defaults | ||
|
||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
|
||
- run: | ||
name: Write NPM Token to ~/.npmrc | ||
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc | ||
|
||
- run: | ||
name: Install dot-json package | ||
command: npm install dot-json | ||
|
||
- run: | ||
name: Write version to package.json | ||
command: $(yarn bin)/dot-json package.json version ${CIRCLE_TAG:1} | ||
|
||
- run: | ||
name: Publish to NPM | ||
command: npm publish --access=public | ||
|
||
workflows: | ||
version: 2 | ||
|
||
build: | ||
jobs: | ||
- checkout | ||
- test: | ||
requires: | ||
- checkout | ||
- lint: | ||
requires: | ||
- checkout | ||
- coveralls: | ||
requires: | ||
- test | ||
- build: | ||
requires: | ||
- test | ||
- lint | ||
|
||
release: | ||
jobs: | ||
- checkout: | ||
filters: | ||
tags: | ||
only: /v[0-9]+(\.[0-9]+)*/ | ||
branches: | ||
ignore: /.*/ | ||
- test: | ||
filters: | ||
tags: | ||
only: /v[0-9]+(\.[0-9]+)*/ | ||
branches: | ||
ignore: /.*/ | ||
requires: | ||
- checkout | ||
- lint: | ||
filters: | ||
tags: | ||
only: /v[0-9]+(\.[0-9]+)*/ | ||
branches: | ||
ignore: /.*/ | ||
requires: | ||
- checkout | ||
- coveralls: | ||
filters: | ||
tags: | ||
only: /v[0-9]+(\.[0-9]+)*/ | ||
branches: | ||
ignore: /.*/ | ||
requires: | ||
- test | ||
- build: | ||
filters: | ||
tags: | ||
only: /v[0-9]+(\.[0-9]+)*/ | ||
branches: | ||
ignore: /.*/ | ||
requires: | ||
- test | ||
- lint | ||
- deploy: | ||
filters: | ||
tags: | ||
only: /v[0-9]+(\.[0-9]+)*/ | ||
branches: | ||
ignore: /.*/ | ||
requires: | ||
- build |
This file was deleted.
Oops, something went wrong.