git icon indicating copy to clipboard operation
git copied to clipboard

Make semantic-release sync Helm Chart.yaml version with package.json version

Open thedanchez opened this issue 3 years ago • 3 comments

I made a similar post here but then realized that the request may be better suited for the @semantic-release/git plugin instead.

Is it possible to have semantic-release also update the version field within my app's Helm Chart.yaml file alongside the other files? Or is this something that is better suited to be in its own plugin (e.g. @semantic-release/helm dedicated to updating Helm charts) ?

thedanchez avatar May 19 '22 17:05 thedanchez

Hi @thedanchez

I use something like this:

[
      "@semantic-release/exec",
      {
        "verifyReleaseCmd": "/ci-utils/update_versions.sh ${nextRelease.version}",
        "prepareCmd": "/ci-utils/update_helm_docs.sh",
        "publishCmd": "echo ${nextRelease.version} > semantic-release-version.txt"
      }
    ],
    [
      "@semantic-release/git",
      {
        "assets": [
          "CHANGELOG.md",
          "package.json",
          "package-lock.json",
          "helm/Chart.yaml",
          "helm/README.md"
        ],
        "message": "chore(release): publishing release ${nextRelease.version}"
      }
    ],

The scripts are very simple, changing the version from a parameter passed and i update all files with the same version.

ki0 avatar May 25 '22 12:05 ki0

Thank you @ki0 !! Will definitely try this out!

thedanchez avatar May 25 '22 15:05 thedanchez