From a8ea8a4c466fa6ec23a078ecd43e46fef15294ae Mon Sep 17 00:00:00 2001 From: Anush Date: Thu, 25 May 2023 11:41:24 +0530 Subject: [PATCH 1/2] fix: Bump manifest only on main --- release.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/release.config.js b/release.config.js index 8f293b7..d40c10b 100644 --- a/release.config.js +++ b/release.config.js @@ -34,6 +34,7 @@ const noteKeywords = [ const { GITHUB_SHA, GITHUB_REPOSITORY, + GITHUB_REF, GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL, GIT_AUTHOR_NAME, @@ -141,7 +142,7 @@ if (actionExists) { } const manifestExists = existsSync("./manifest.json"); -if (manifestExists) { +if (manifestExists && GITHUB_REF === "refs/heads/main") { addPlugin("@google/semantic-release-replace-plugin", { "replacements": [{ "files": [ From 1705ab7a175cfe705cadc2ca3a92780f0e9a0661 Mon Sep 17 00:00:00 2001 From: Anush Date: Thu, 25 May 2023 11:54:01 +0530 Subject: [PATCH 2/2] docs: Update README.md with manifest bump info --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d218fe2..68534c8 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,7 @@ If you have an `action.yml` present, our config will attempt to adjust the conta Unless you have a `manifest.json` present in your root folder, this module is not added to the release config. -If you have a `manifest.json` present, our config will attempt to adjust the `version` value to the newly pushed `npm` and `docker` tags. +If you have a `manifest.json` present, our config will attempt to adjust the `version` value to the newly pushed `npm` and `docker` tags. This version bump is limited to releases made exclusively on the `main` branch. ### Docker