Skip to content

Merott/semantic-release-codeship-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An example of using semantic-release to automatically publish a module from Codeship to NPM.

Resources

Stars

Watchers

Forks

Packages

No packages published