# Making commits to the repository (For the Devs)
The repository uses github workflow to automatically publish to NPM registry. In order to publish the SDK, there are following criterias which must be followed :  
* The version in `package.json` must be updated
* The commit message must be `Release <VERSION_IN_PACKAGE.JSON>`  

In order to commit a change but not publish it to NPM, try not to follow either of the above mentioned  criteria  
Both, merge as well as commit to `main` branch are treated equally, hence make commit accordingly.  

## Example commit
* To publish to NPM :
  ```
  // Sample package.json file
  {
      "name": "@blockswaplab/stakehouse-sdk",
      "version": "1.0.1",
      "description": "Reports updated balance to Balance Report Smart Contract",
      "repository": "bsn-eng/stakehouse-sdk"
  }
  ```
  Commit message should be `Release 1.0.1`. If there are no build errors, the SDK should be published.
* To not publish to NPM :  
  Commit message can be `Fixed a bug`. This means, that neither the package version was updated nor the commit message pattern was followed.  
