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 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": [