From 11bec17d4d94a3c2f934715ac00abc7141c0f0ba Mon Sep 17 00:00:00 2001 From: Anush Date: Thu, 25 May 2023 12:01:29 +0530 Subject: [PATCH] fix: bump manifest only on main (#14) unblocks https://github.com/open-sauced/ai/issues/121 --- README.md | 2 +- release.config.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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": [