New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add auto-release #40
Merged
Merged
Add auto-release #40
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that this project is published to npm as beta and I have no idea how
auto-update
will handle it, I've configured the project to only release when therelease
label is present. @alloy after this transitions from beta you can remove this configuration. Until then you probably want to release it by hand...