Skip to content

Commit

Permalink
feat: manifest version value bump (#13)
Browse files Browse the repository at this point in the history
* feat: manifest.json version bump

* docs: manifest.json version bump info README.md
  • Loading branch information
Anush008 committed May 25, 2023
1 parent 80167e9 commit 9f4cd6f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ Unless you have an `action.yml` present in your root folder, this module is not

If you have an `action.yml` present, our config will attempt to adjust the container version to the newly pushed `npm` and `docker` tags.

### Manifest.json

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.

### Docker

Unless you have a `Dockerfile` present in your root folder, this module is not added to the release config.
Expand Down
23 changes: 22 additions & 1 deletion release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,26 @@ if (actionExists) {
});
}

const manifestExists = existsSync("./manifest.json");
if (manifestExists) {
addPlugin("@google/semantic-release-replace-plugin", {
"replacements": [{
"files": [
"manifest.json"
],
"from": `"version": ".*"`,
"to": `"version": "\${nextRelease.version}"`,
"results": [{
"file": "manifest.json",
"hasChanged": true,
"numMatches": 1,
"numReplacements": 1
}],
"countMatches": true
}]
});
}

addPlugin("@semantic-release/git", {
"assets": [
"LICENSE*",
Expand All @@ -151,7 +171,8 @@ addPlugin("@semantic-release/git", {
"pnpm-lock.yaml",
"public/**/*",
"supabase/**/*",
"action.yml"
"action.yml",
"manifest.json"
],
"message": `chore(<%= nextRelease.type %>): release <%= nextRelease.version %> <%= nextRelease.channel !== null ? \`on \${nextRelease.channel} channel \` : '' %>[skip ci]\n\n<%= nextRelease.notes %>`
});
Expand Down

0 comments on commit 9f4cd6f

Please sign in to comment.