chore(ci and npm): Setup CircleCI and semantic-release
Setup CircleCI and semantic-release
This commit is contained in:
parent
a15ff29ccf
commit
525ebfa06e
|
@ -0,0 +1,66 @@
|
|||
defaults: &defaults
|
||||
working_directory: ~/code
|
||||
docker:
|
||||
- image: circleci/node:10.6.0-browsers
|
||||
|
||||
version: 2
|
||||
jobs:
|
||||
setup:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
name: Restore node modules
|
||||
keys:
|
||||
- node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
|
||||
|
||||
- run:
|
||||
name: Install dependencies
|
||||
command: yarn --pure-lockfile
|
||||
|
||||
- save_cache:
|
||||
name: Save node modules
|
||||
key: node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
|
||||
paths:
|
||||
- node_modules
|
||||
|
||||
tests:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
name: Restore node modules
|
||||
keys:
|
||||
- node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
|
||||
|
||||
- run:
|
||||
name: Run Tests
|
||||
command: yarn ci:test
|
||||
|
||||
publish:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
name: Restore node modules
|
||||
keys:
|
||||
- node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
|
||||
|
||||
- run:
|
||||
name: Publish to NPM
|
||||
command: yarn ci:publish
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
ci:
|
||||
jobs:
|
||||
- setup
|
||||
- tests:
|
||||
requires:
|
||||
- setup
|
||||
- publish:
|
||||
requires:
|
||||
- tests
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
|
@ -37,7 +37,6 @@ node_modules/
|
|||
npm-debug.log
|
||||
yarn-error.log
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
|
||||
# Rubygem bundles
|
||||
#
|
||||
|
|
17
package.json
17
package.json
|
@ -6,11 +6,15 @@
|
|||
"contributors": [
|
||||
"Thibault Malbranche <malbranche.thibault@gmail.com>"
|
||||
],
|
||||
"version": "2.0.0",
|
||||
"version": "0.0.0-development",
|
||||
"homepage": "https://github.com/react-native-community/react-native-webview#readme",
|
||||
"scripts": {
|
||||
"flow": "flow check",
|
||||
"flow-android": "flow check --flowconfig-name .flowconfig.android"
|
||||
"test:ios:flow": "flow check",
|
||||
"test:android:flow": "flow check --flowconfig-name .flowconfig.android",
|
||||
"ci:publish": "yarn semantic-release",
|
||||
"ci:test": "yarn ci:test:flow",
|
||||
"ci:test:flow": "yarn test:ios:flow && yarn test:android:flow",
|
||||
"semantic-release": "semantic-release"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.0",
|
||||
|
@ -22,6 +26,11 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"flow-bin": "^0.80.0",
|
||||
"react-native": "^0.57"
|
||||
"react-native": "^0.57",
|
||||
"semantic-release": "^15.9.17"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/react-native-community/react-native-webview.git"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue