Skip to content

Commit 9e7e5b8

Browse files
committed
expose bump level as output
Signed-off-by: Mohammad Ghazanfar Ali Danish <mohammad.ghazanfar.ali.danish@sap.com>
1 parent a438361 commit 9e7e5b8

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

.github/actions/core/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ outputs:
5858
description: "True if version was bumped"
5959
new-version:
6060
description: "The new version"
61+
bump:
62+
description: "The computed SemVer bump level (major, minor, patch)"
6163

6264
runs:
6365
using: node20

.github/actions/core/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ async function run(): Promise<void> {
5151
const currentVersion = await fetchCurrentVersion(git, buildType, files, defaultBranch,versionPropertyPath);
5252
const level = determineVersionLevelFromPRTitle(prTitle);
5353
const newVersion = bumpVersion(currentVersion, level);
54+
core.setOutput('bump', level);
5455

5556
await updateLocalVersion(
5657
buildType,

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ with:
5858
| `pyproject-file` | Path to pyproject.toml (python only). | `pyproject.toml` | No |
5959
| `version-file` | Path to version file (version-file only). | `VERSION` | No |
6060

61+
### Outputs
62+
63+
- `bumped`: True if version was bumped
64+
- `new-version`: The new version number
65+
- `bump`: The computed SemVer bump level (`major`, `minor`, or `patch`)
66+
6167
## Contributing
6268

6369
### Forked Repositories

0 commit comments

Comments
 (0)