From 7b15f2f0f2322d16604fb758a26e6caf35095f27 Mon Sep 17 00:00:00 2001 From: Yosevu Kilonzo Date: Wed, 11 Aug 2021 07:17:56 -0500 Subject: [PATCH] chore: separate release from push This means that two scripts are required to create and push a release, but it makes it easier to create specific version. For example: 1. `npm run release release-as minor` 2. `npm run release:push` --- CONTRIBUTING.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bce895a..460fe7d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,6 +43,11 @@ This will: - Use all commit messages since the latest version tag to determine the correct new version - Increment the version in package.json and package-lock.json - Create a tagged commit with the new version + +```sh +npm run release:push +``` + - Push your branch (and new tag) to the remote After your branch is merged, CI will take care of publishing to the npm registry. diff --git a/package.json b/package.json index 436de77..913e7a9 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "test": "mocha test.js", - "tag": "git push --follow-tags origin head", + "release:push": "git push --follow-tags origin head", "release": "standard-version" }, "keywords": [