Release - biswajitsundara/gitdoc GitHub Wiki

Here is the complete workflow to create a release and publish to npm package.

A. Branching Strategy

  • The master branch exists
  • Create a develop branch out of master
  • Create feature specific branches like features/cart from develop branch, raise PR and merge to develop
  • Now we have all features in develop branch that needs to be added to master and we need to create a release.

B. Creating Tags

2. Ensure Your Local Repository is Up-to-Date

git checkout develop
git pull origin develop

3. Create the Tag

git tag v0.0.5

Better to add a message so use this command instead

git tag -a v0.0.5 -m "Release version 0.0.5"

4. Push the Tag to Remote Repository

git push origin v0.0.5

C. Merge develop -> master

1. Keep master branch up-to-date

git checkout master
git pull origin master

2. Merge the develop branch

git merge develop

3. Push the updates to remote

git push origin master

D. Creating Release in github

  • On the repo home page, check the right hand side
  • Click on releases and navigate to "Releases" tab.
  • Select the tag from the drop down
  • Click on "Auto generate" release info
  • Publish

E. Publishing to NPM

  • In your local, make sure the version is updated in package.json
  • Update this step before planning for a release as both should be in sync.
  • First generate the bundle, e.g npm run package is configured for ghewar
  • Then publish npm publish