1.0.2 • Published 8 years ago

semantic-release-codeship-example v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

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
  2. 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
  3. 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
  4. Copy the GH_TOKEN and NPM_TOKEN values and add them as environment variables to your Codeship project settings.

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

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

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