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 #40 from artsy/add-auto-release
Add auto-release
- Loading branch information
Showing
5 changed files
with
380 additions
and
1,970 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,12 @@ | ||
{ | ||
"no-version-prefix": true, | ||
"onlyPublishWithReleaseLabel": true, | ||
"name": "Artsy", | ||
"email": "it@artsymail.com", | ||
"labels": { | ||
"major": "Version: Major", | ||
"minor": "Version: Minor", | ||
"patch": "Version: Patch", | ||
}, | ||
"noReleaseLabels": ["Version: Trivial", "Skip Release"] | ||
} |
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,79 +1,59 @@ | ||
defaults: &defaults | ||
working_directory: ~/artsy/react-responsive-media | ||
docker: | ||
- image: circleci/node:8 | ||
version: 2.1 | ||
|
||
save_cache: &save_cache | ||
save_cache: | ||
key: yarn-deps-{{ checksum "yarn.lock" }} | ||
paths: | ||
- ./node_modules | ||
orbs: | ||
node: artsy/node@0.1.0 | ||
yarn: artsy/yarn@0.0.2 | ||
|
||
restore_cache: &restore_cache | ||
restore_cache: | ||
keys: | ||
- yarn-deps-{{ checksum "yarn.lock" }} | ||
- yarn-deps- | ||
|
||
verify_dependencies: &verify_dependencies | ||
run: yarn --check-files | ||
|
||
filter_master: &filter_master | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
|
||
version: 2 | ||
jobs: | ||
update-cache: | ||
<<: *defaults | ||
lint: | ||
executor: node/build | ||
steps: | ||
- checkout | ||
- <<: *restore_cache | ||
- <<: *verify_dependencies | ||
- <<: *save_cache | ||
- yarn/setup | ||
- run: yarn lint | ||
type-check: | ||
<<: *defaults | ||
executor: node/build | ||
steps: | ||
- checkout | ||
- <<: *restore_cache | ||
- <<: *verify_dependencies | ||
- yarn/setup | ||
- run: yarn type-check | ||
lint: | ||
<<: *defaults | ||
deploy: | ||
executor: node/build | ||
steps: | ||
- checkout | ||
- <<: *restore_cache | ||
- <<: *verify_dependencies | ||
- run: yarn lint | ||
- add_ssh_keys | ||
- yarn/setup | ||
# Setup the .npmrc with the proper registry and auth token to publish | ||
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc | ||
- run: yarn release | ||
test: | ||
<<: *defaults | ||
executor: node/build | ||
steps: | ||
- checkout | ||
- <<: *restore_cache | ||
- <<: *verify_dependencies | ||
- run: yarn jest | ||
deploy: | ||
<<: *defaults | ||
- yarn/setup | ||
# Runs jest tests with 6 concurrent workers. Without limiting it to 6 | ||
# workers Jest will spawn many memory hungry workers and ultimately | ||
# starve the job for memory. | ||
- run: yarn test -w 6 | ||
update-cache: | ||
executor: node/build | ||
steps: | ||
- checkout | ||
- <<: *restore_cache | ||
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc | ||
- run: yarn semantic-release | ||
- yarn/update_dependencies | ||
|
||
workflows: | ||
version: 2 | ||
build_and_verify: | ||
jobs: | ||
- update-cache | ||
- type-check | ||
- lint | ||
- type-check | ||
- test | ||
- deploy: | ||
# The deploy job is the _only_ job that should have access to our npm | ||
# tokens. We include a context that has our publish credentials | ||
# explicitly in this step. https://circleci.com/docs/2.0/contexts/ | ||
context: npm-deploy | ||
<<: *filter_master | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
requires: | ||
- update-cache | ||
- test | ||
- lint | ||
- type-check | ||
- test | ||
- update-cache |
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
Oops, something went wrong.