Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

last-release-git npm version Build Status

This is getLastRelease plugin for older versions of semantic-release. It's made for projects which must not be published at NPM.

By default semantic-release extracts latest version from NPM registry but last-release-git extracts it from git tags.

Getting started

Install the plugin:

npm install last-release-git --save-dev

Add release field to your package.json as described at plugins documentation:

"release": {
  "getLastRelease": "last-release-git"
}

Make sure your travis build fetches your git tags before running semantic-release. If you have no special git commands in your .travis.yml file, make sure to fetch all tags in your after_success section like this:

after_success:
  - git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
  - git fetch --tags
  - npm run semantic-release

Create the first git tag manually and push it:

git tag v0.0.0
git push --tags

That's it.

The last thing you may want to do is to set dummy NPM_TOKEN environment variable at CI (semantic-release throws an error if it doesn't exist) like this one: 00000000-0000-0000-0000-000000000000.

About

semantic-release plugin for projects that must not be published at NPM

Resources

License

You can’t perform that action at this time.