diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e66edd30..13889f11d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,6 +11,7 @@ Here are some guides on how to do that: - [Requesting Features](#requesting-features) - [Submitting a PR](#submitting-a-pr) - [Where to Start](#where-to-start) +- [Publishing new versions](#publishing-new-versions) @@ -76,3 +77,40 @@ It's our turn from there on! We will review the PR and discuss changes you might ## Where to Start If you want to contribute, but you are not sure where to start - look for [issues labeled `help wanted`](https://github.com/NativeScript/nativescript-angular/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). + + +## Publishing new versions + +Instructions how to publish a new version for Maintainers. + +1. Execute `npm install` to install dependencies and prepare the package for publishing: +```bash +cd nativescript-angular/nativescript-angular +npm install +``` + +2. Add the following to your `.npmrc`: +``` +tag-version-prefix="" +message="release: cut the %s release" +``` + +3. Create new branch for the release: +```bash +git checkout -b username/release-version +``` + +4. Execute [`npm version`](https://docs.npmjs.com/cli/version) to bump the version in the `package.json` file, tag the release and update the CHANGELOG.md: +```bash +npm version [patch|minor|major] +``` + +5. Push all the changes to your branch and create a pull request: +```bash +git push --set-upstream origin username/release-version --tags +``` + +6. Publish the package to `npm` after the pull request is merged: +```bash +npm publish +``` diff --git a/nativescript-angular/package.json b/nativescript-angular/package.json index 0229af3aa..85f7a8162 100644 --- a/nativescript-angular/package.json +++ b/nativescript-angular/package.json @@ -33,7 +33,8 @@ "tsc": "tsc -p tsconfig.json", "tsc-w": "tsc -p tsconfig.json -w", "ngc": "ngc -p tsconfig.json", - "prepare": "npm run ngc" + "prepare": "npm run ngc", + "version": "rm package-lock.json && conventional-changelog -p angular -i ../CHANGELOG.md -s && git add ../CHANGELOG.md" }, "bin": { "update-app-ng-deps": "./bin/update-app-ng-deps"