An example of using semantic-release to automatically publish a module from Codeship to NPM.
JavaScript
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
images
.gitignore
README.md
index.js
index.test.js
package.json

README.md

semantic-release-codeship-example

Codeship Status for Merott/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.

  1. Install the dependencies:
npm install -g semantic-release-cli
npm install
  1. 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
    
  2. 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
    

    semantic-release-cli setup shell

  3. Copy the GH_TOKEN and NPM_TOKEN values and add them as environment variables to your Codeship project settings.

  4. In addition to above, add a CI=true environment variable to the Codeship project.

  5. From your Project Settings on Codeship, add a new deployment pipeline:

    • When branch is exactly master
    • Using a Custom Script: npm run semantic-release
  6. 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