Skip to content

Commit

Permalink
fix: bump manifest only on main (open-sauced#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anush008 committed May 25, 2023
1 parent ecb32d3 commit 11bec17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const noteKeywords = [
const {
GITHUB_SHA,
GITHUB_REPOSITORY,
GITHUB_REF,
GIT_COMMITTER_NAME,
GIT_COMMITTER_EMAIL,
GIT_AUTHOR_NAME,
Expand Down Expand Up @@ -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": [
Expand Down

0 comments on commit 11bec17

Please sign in to comment.