Skip to content

Commit

Permalink
fix(ci): Test CI Release
Browse files Browse the repository at this point in the history
  • Loading branch information
carlinisaacson committed Dec 13, 2018
1 parent 7c2babc commit 515dbbc
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 6 deletions.
32 changes: 28 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ jobs:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}


tests:
rollup_and_tests:
<<: *defaults
steps:
- checkout
Expand All @@ -41,15 +40,40 @@ jobs:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Run rollup
command: yarn build
- run:
name: Run tests
command: yarn test

publish:
<<: *defaults
steps:
- checkout
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- restore_cache:
name: Restore node modules
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
# Run semantic-release after all the above is set.
- run:
name: Publish to NPM
command: yarn ci:publish # this will be added to your package.json scripts

workflows:
version: 2
test_and_release:
jobs:
- setup
- tests:
- rollup_and_tests:
requires:
- setup
- publish:
requires:
- setup
- rollup_and_tests
filters:
branches:
only: master
22 changes: 20 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"coverage": "nyc ava",
"build": "rollup -c",
"lint": "standard",
"prepublishOnly": "npm run build"
"prepublishOnly": "npm run build",
"ci:publish": "yarn semantic-release",
"semantic-release": "semantic-release"
},
"keywords": [
"redux"
Expand All @@ -30,6 +32,7 @@
"ramdasauce": "^2.0.0"
},
"devDependencies": {
"@semantic-release/git": "^7.0.5",
"ava": "^0.21.0",
"babel-cli": "^6.24.0",
"babel-eslint": "^7.2.1",
Expand All @@ -38,12 +41,12 @@
"babel-preset-es2015": "^6.24.0",
"babel-preset-es2015-rollup": "^3.0.0",
"babel-preset-stage-0": "^6.22.0",
"np": "^2.16.0",
"nyc": "^11.1.0",
"rollup": "^0.47.2",
"rollup-plugin-babel": "^3.0.1",
"rollup-plugin-filesize": "^1.4.2",
"rollup-plugin-ramda": "^1.0.5",
"semantic-release": "^15.12.5",
"standard": "^10.0.1"
},
"ava": {
Expand All @@ -60,5 +63,20 @@
},
"standard": {
"parser": "babel-eslint"
},
"release": {
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github",
[
"@semantic-release/git",
{
"assets": "package.json",
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
}

0 comments on commit 515dbbc

Please sign in to comment.