Skip to content

feat: add include-v-in-release-name config option#2633

Merged
chingor13 merged 1 commit intogoogleapis:mainfrom
mldangelo:feat/include-v-in-release-name
Dec 22, 2025
Merged

feat: add include-v-in-release-name config option#2633
chingor13 merged 1 commit intogoogleapis:mainfrom
mldangelo:feat/include-v-in-release-name

Conversation

@mldangelo
Copy link
Contributor

Summary

This PR adds a new configuration option include-v-in-release-name that controls whether the v prefix is included in GitHub release names.

Problem

Currently, the GitHub release name is hardcoded to always include the v prefix (e.g., v1.2.3). Users who prefer releases without the v prefix have no way to configure this. While include-v-in-tag exists to control the tag name, there's no equivalent for the release name.

Solution

Added a new include-v-in-release-name boolean configuration option that:

  • Defaults to true (maintains backwards compatibility)
  • When set to false, creates releases without the v prefix (e.g., 1.2.3)
  • Works independently of include-v-in-tag to allow different formats for tags vs release names

Changes

  • schemas/config.json: Added include-v-in-release-name property to the schema
  • src/manifest.ts: Added includeVInReleaseName to ReleaserConfig interface and config parsing
  • src/strategies/base.ts: Modified release name generation to use the new option
  • src/updaters/release-please-config.ts: Added serialization support
  • test/strategies/base.ts: Added tests for the new functionality

Example Config

{
  "include-v-in-tag": false,
  "include-v-in-release-name": false,
  "packages": {
    ".": {
      "release-type": "node"
    }
  }
}

With this config:

  • Tag: 1.2.3
  • Release name: 1.2.3

Use Case

Users who:

  1. Want consistent naming between tags and release names without v
  2. Have downstream tooling that expects release names without the v prefix
  3. Prefer semantic version numbers without the v prefix for releases

This follows the pattern established by the existing include-v-in-tag option and provides users with complete control over version prefix formatting.

This adds a new configuration option `include-v-in-release-name` that
controls whether the `v` prefix is included in GitHub release names.

Previously, the release name was hardcoded to always include the `v`
prefix (e.g., `v1.2.3`). This change allows users to opt out of the
`v` prefix by setting `include-v-in-release-name: false` in their
release-please config.

The default behavior is unchanged (`true`), maintaining backwards
compatibility.

Changes:
- Added `include-v-in-release-name` to config schema
- Added `includeVInReleaseName` to ReleaserConfig interface
- Updated BaseStrategy to use the new option when building release name
- Added serialization support in release-please-config updater
- Added tests for the new functionality

Example config:
```json
{
  "include-v-in-tag": false,
  "include-v-in-release-name": false,
  "packages": {
    ".": {
      "release-type": "node"
    }
  }
}
```

With the above config, releases would be named `1.2.3` instead of `v1.2.3`.
@mldangelo mldangelo requested review from a team as code owners December 8, 2025 21:24
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Dec 8, 2025
@unique-dominik
Copy link

I was looking for that! Could this be reviewed? ❤️

@chingor13 chingor13 merged commit 84a43ef into googleapis:main Dec 22, 2025
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants