Skip to content

Commit

Permalink
Merge pull request #126 from linkorb/npm-version-updates-during-relea…
Browse files Browse the repository at this point in the history
…se-9468

feat: bump package.json version in release #9468
  • Loading branch information
mhitza authored Feb 12, 2025
2 parents 5a60c3c + f82bdce commit d114d46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tasks/other-dev-generated-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
ansible.builtin.template:
src: ./templates/.releaserc.cjs.j2
dest: "{{ repo_path }}/.releaserc.cjs"
vars:
package_json_version_bump: "{{ repo.type.startswith('nodejs-') }}"

- name: find workflow extensions
ansible.builtin.command: "./library/list_extension_workflows.py '{{ repo_path }}'"
Expand Down
5 changes: 4 additions & 1 deletion templates/.releaserc.cjs.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ module.exports = {
"@semantic-release/github",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
{% if package_json_version_bump %}
[ "@semantic-release/npm", { npmPublish: false } ],
{% endif %}
[ "@semantic-release/git", {
assets: [ "CHANGELOG.md" ],
assets: [ "CHANGELOG.md" {% if package_json_version_bump %}, "package.json" {% endif %}],
message: "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
} ],
[ "@semantic-release/exec", { publishCmd: "echo ${nextRelease.version} > .gitrelease" } ]
Expand Down

0 comments on commit d114d46

Please sign in to comment.