semantic-release-codeship-example
v1.0.2
Published
Example of using semantic-release with Codeship to automatically deploy NPM packages
Downloads
10
Readme
semantic-release-codeship-example
An example of using semantic-release
to automatically publish a module from Codeship to NPM.
Set up
Note: if you want to try this for yourself, you must first clone/fork the
project, and use a different name
in package.json
.
- Install the dependencies:
npm install -g semantic-release-cli
npm install
Create a Codeship project on codeship.com. Simply link to the Github project, and configure with:
Setup Commands:
nvm install 5 nvm use 5 npm install
Test Pipelines:
npm test
Back to the command line, set up
semantic-release
:semantic-release-cli setup # select "Other (prints tokens)" when prompted for the CI you are using
Copy the
GH_TOKEN
andNPM_TOKEN
values and add them as environment variables to your Codeship project settings.In addition to above, add a
CI=true
environment variable to the Codeship project.From your Project Settings on Codeship, add a new deployment pipeline:
- When branch is exactly
master
- Using a Custom Script:
npm run semantic-release
- When branch is exactly
Commit and push to your git
master
branch, then simply wait!
We're also making use of the generateNotes
plugin to automatically generate
release notes: https://github.com/Merott/semantic-release-codeship-example/releases