-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Automatic publishing * Remove transpilation from readme as Node.js 8 is the latest supported version * Move readme.md * Remove lib file
- Loading branch information
1 parent
df157df
commit a608dd9
Showing
18 changed files
with
4,119 additions
and
1,126 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 |
---|---|---|
@@ -1,7 +1,111 @@ | ||
version: 2 | ||
version: 2.1 | ||
|
||
######################### | ||
# Aliases | ||
######################### | ||
|
||
aliases: | ||
- &store_test_results | ||
store_test_results: | ||
path: ~/repo/test_results.xml | ||
- &persist_to_workspace | ||
persist_to_workspace: | ||
root: ~/repo | ||
paths: ['.'] | ||
- &attach_workspace | ||
attach_workspace: | ||
at: . | ||
|
||
######################### | ||
# Executors | ||
######################### | ||
|
||
executors: | ||
node: | ||
docker: | ||
- image: circleci/node:8 | ||
working_directory: ~/repo | ||
|
||
######################### | ||
# Commands | ||
######################### | ||
|
||
commands: | ||
yarn_install: | ||
steps: | ||
- run: | ||
name: Installing Dependencies | ||
command: yarn install --frozen-lockfile | ||
yarn_lint: | ||
steps: | ||
- run: | ||
name: Linting | ||
command: yarn lint | ||
test_all: | ||
steps: | ||
- run: | ||
name: Run All Tests | ||
command: > | ||
yarn test | ||
save_npm_token: | ||
steps: | ||
- run: | ||
name: Potentially save npm token | ||
command: '([[ ! -z $NPM_TOKEN ]] && echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc) || echo "Did not write npm token"' | ||
publish_canary: | ||
steps: | ||
- run: | ||
name: Potentially publish canary release | ||
command: 'if ls ~/.npmrc >/dev/null 2>&1 && [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; then yarn run lerna publish from-git --npm-tag canary --yes; else echo "Did not publish"; fi' | ||
publish_stable: | ||
steps: | ||
- run: | ||
name: Potentially publish stable release | ||
command: 'if ls ~/.npmrc >/dev/null 2>&1 && [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; then yarn run lerna publish from-git --yes; else echo "Did not publish"; fi' | ||
|
||
######################### | ||
# Jobs | ||
######################### | ||
|
||
jobs: | ||
build: | ||
machine: true | ||
executor: node | ||
steps: | ||
- checkout | ||
- run: docker build . | ||
- yarn_install | ||
- yarn_lint | ||
- *persist_to_workspace | ||
test: | ||
executor: node | ||
steps: | ||
- *attach_workspace | ||
- test_all | ||
- *store_test_results | ||
deploy: | ||
executor: node | ||
steps: | ||
- *attach_workspace | ||
- save_npm_token | ||
- publish_canary | ||
- publish_stable | ||
|
||
######################### | ||
# Workflows | ||
######################### | ||
|
||
workflows: | ||
version: 2 | ||
build-test-and-deploy: | ||
jobs: | ||
- build | ||
- test: | ||
requires: | ||
- build | ||
- deploy: | ||
requires: | ||
- test | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- canary |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.