An example of using semantic-release
to automatically publish a module from Codeship to NPM.
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
and NPM_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:
master
npm run semantic-release
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