Skip to content

Commit

Permalink
Merge pull request #25 from dannyrb/ci/semantic-release
Browse files Browse the repository at this point in the history
ci: semantic-release
  • Loading branch information
dannyrb authored Sep 13, 2019
2 parents ecae76f + 9ce49de commit 743055e
Show file tree
Hide file tree
Showing 6 changed files with 271 additions and 12 deletions.
91 changes: 91 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Use the latest 2.1 version of CircleCI pipeline processing engine, see https://circleci.com/docs/2.0/configuration-reference/
version: 2.1

defaults: &defaults
working_directory: ~/repo
# https://circleci.com/docs/2.0/circleci-images/#language-image-variants
docker:
- image: circleci/node:10.15.1
environment:
TERM: xterm # Enable colors in term

jobs:
CHECKOUT:
<<: *defaults
steps:
- checkout
- restore_cache:
name: Restore Package Cache
keys:
- packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
- packages-v1-{{ .Branch }}-
- packages-v1-
- run: yarn install
- save_cache:
name: Save Package Cache
paths:
- ~/.cache/yarn
key: packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
- persist_to_workspace:
root: ~/repo
paths: .

BUILD:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run: npm run build:release
# https://circleci.com/docs/2.0/collect-test-data/#karma
# - store_test_results:
# path: reports/junit
# - store_artifacts:
# path: reports/junit
- persist_to_workspace:
root: ~/repo
paths: .

NPM_PUBLISH:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run:
name: Avoid hosts unknown for github
command:
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking
no\n" > ~/.ssh/config
- run:
name: Publish using Semantic Release
command: npx semantic-release

workflows:
version: 2

# PULL REQUEST
PULL_REQUEST:
jobs:
- CHECKOUT:
filters:
branches:
ignore:
- master
- feature/*
- hotfix/*
- BUILD:
requires:
- CHECKOUT

# MERGE TO MASTER
TEST_AND_RELEASE:
jobs:
- CHECKOUT:
filters:
branches:
only: master
- BUILD:
requires:
- CHECKOUT
- NPM_PUBLISH:
requires:
- BUILD
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ npm install --save react-vtkjs-viewport
## License

MIT © [OHIF](https://github.com/OHIF)


<!--
Links
-->
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-app-polyfill": "^1.0.1",
"react-cornerstone-viewport": "0.2.2",
"react-cornerstone-viewport": "^0.2.4",
"react-dev-utils": "^7.0.5",
"react-dom": "^16.8.6",
"react-resize-detector": "^4.1.3",
Expand Down
15 changes: 8 additions & 7 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8690,10 +8690,10 @@ react-app-polyfill@^1.0.1:
regenerator-runtime "0.13.2"
whatwg-fetch "3.0.0"

[email protected].2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/react-cornerstone-viewport/-/react-cornerstone-viewport-0.2.2.tgz#5860e35c48927d66839f66b59944442b8f6b5f67"
integrity sha512-NdfV3ZAxYJ6PhqO/NETWNWJ7WiV/jOCS0WkfMaA3FC2ySKXg/mtvQbwsDFKV6p+Y2/u5WANpgq13Gn++JhIHYA==
react-cornerstone-viewport@^0.2.4:
version "0.2.4"
resolved "https://registry.yarnpkg.com/react-cornerstone-viewport/-/react-cornerstone-viewport-0.2.4.tgz#d553c97482e0286e0c7c3cd38595905932410791"
integrity sha512-PKDQZRJL94qKO6MVdxVf1c4xhs68FWhECYxftSHY83uAWn7yvSkVr+UtctX/6uKeE4T7FDn33QBji1ceTa+Hnw==
dependencies:
lodash.debounce "^4.0.8"
moment "^2.23.0"
Expand Down Expand Up @@ -8789,9 +8789,10 @@ [email protected]:
tiny-invariant "^1.0.2"
tiny-warning "^1.0.0"

"react-vtkjs-viewport@link:..":
version "0.0.0"
uid ""
"react-vtkjs-viewport@file:..":
version "0.0.12"
dependencies:
moment "^2.24.0"

react@^16.8.6:
version "16.8.6"
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
"peerDependencies": {
"react": "^16.8.6",
"react-dom": "^16.8.6"
"react-dom": "^16.8.6",
"vtk.js": "^11.0.1"
},
"devDependencies": {
"@babel/core": "^7.4.5",
Expand Down Expand Up @@ -53,6 +54,7 @@
"style-loader": "^0.23.1",
"stylelint": "^10.1.0",
"stylelint-config-recommended": "^2.2.0",
"vtk.js": "^11.0.1",
"webpack": "4.34.0",
"webpack-cli": "^3.3.4",
"worker-loader": "^2.0.0"
Expand Down
Loading

0 comments on commit 743055e

Please sign in to comment.