Skip to content
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

Revise deploy steps #105

Merged
merged 5 commits into from
Oct 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,30 @@ install:
before_script:
- yarn flow
- yarn lint
- yarn test

script:
# Auth NPM for later release
- npm config set //registry.npmjs.org/:_authToken=\${NPM_TOKEN}
# Publish canary builds when feature merges back to develop
- "if [ ${TRAVIS_PULL_REQUEST} = 'false' ] && [ ${TRAVIS_BRANCH} = 'develop' ]; then yarn canary ; fi"
# Publish release builds when merges to master
- "if [ ${TRAVIS_PULL_REQUEST} = 'false' ] && [ ${TRAVIS_BRANCH} = 'master' ]; then sh ./scripts/deploy.sh ; fi"
- yarn test

# Send coverage data to Coveralls
after_script:
after_success:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

before_deploy:
- npm config set //registry.npmjs.org/:_authToken=\${NPM_TOKEN}

deploy:
- provider: script
script: yarn canary
skip_cleanup: true
on:
branch: develop

- provider: script
script: yarn release && yarn ghpages
skip_cleanup: true
on:
branch: master

branches:
only:
- master
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,16 @@ Gypcrete does not publish develop builds to the `dist` branch anymore. It now pu
* When pushed to `develop` branch --> publish a canary build
* When pushed to `master` branch --> publish a relase build

### Releasing
When releasing a new build for Gypcrete, create a release branch `release/x.y.z` and bump version first by:
```sh
yarn bumpversion
```

This will run `lerna publish`, which updates all `package.json` files in `packages/`, commits the changes with pre-configured message and tags that commit.

Then create a pull request for this release branch.
Once it's merged into `master`, it should trigger `yarn release` and publishes packages to npm.

## LICENSE
This project is licensed under the terms of the [Apache License 2.0](https://github.com/ichef/gypcrete/blob/master/LICENSE)
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"scripts": {
"prepublish": "lerna run prepublish",
"start": "lerna run storybook --stream",
"release": "lerna publish -m \"Lerna publish %s\" --yes --repo-version $PACKAGE_VERSION",
"bumpversion": "lerna publish -m \"Bump version to %s\" --skip-npm",
"release": "lerna publish --yes --repo-version $PACKAGE_VERSION --skip-git",
"canary": "lerna publish -c --yes",
"ghpages": "lerna run ghpages",
"lint": "npm run lint:eslint && npm run lint:stylelint",
Expand Down
10 changes: 0 additions & 10 deletions scripts/deploy.sh

This file was deleted.