Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actions/core/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ outputs:
description: "True if version was bumped"
new-version:
description: "The new version"
bumpLevel:
description: "The computed SemVer bump level (major, minor, patch)"

runs:
using: node20
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/core/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ async function run() {
const currentVersion = await (0, fetch_version_1.fetchCurrentVersion)(git, buildType, files, defaultBranch, versionPropertyPath);
const level = (0, parse_commit_1.determineVersionLevelFromPRTitle)(prTitle);
const newVersion = (0, bump_version_1.bumpVersion)(currentVersion, level);
core.setOutput('bumpLevel', level);
await (0, update_version_1.updateLocalVersion)(buildType, core.getInput('bump-command') || '', newVersion, files);
if (postCommand) {
core.info(`Executing post-command: ${postCommand}`);
Expand All @@ -199,6 +200,7 @@ async function run() {
core.summary.addDetails("Version Bump", `Bumped version from ${currentVersion} to ${newVersion}`);
core.setOutput('new-version', newVersion);
core.setOutput('bumped', true);
core.setOutput("bumpLevel", level);
}
else {
core.info('No changes detected, skipping commit and push.');
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ async function run(): Promise<void> {
const currentVersion = await fetchCurrentVersion(git, buildType, files, defaultBranch,versionPropertyPath);
const level = determineVersionLevelFromPRTitle(prTitle);
const newVersion = bumpVersion(currentVersion, level);
core.setOutput('bumpLevel', level);

await updateLocalVersion(
buildType,
Expand Down Expand Up @@ -81,6 +82,7 @@ async function run(): Promise<void> {
core.summary.addDetails("Version Bump", `Bumped version from ${currentVersion} to ${newVersion}`);
core.setOutput('new-version', newVersion);
core.setOutput('bumped', true);
core.setOutput("bumpLevel", level);
} else {
core.info('No changes detected, skipping commit and push.');
core.setOutput('bumped', false);
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/version-bumping/maven/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ outputs:
new-version:
description: "The new version"
value: ${{ steps.bump.outputs.new-version }}
bumpLevel:
description: "The computed SemVer bump level (major, minor, patch)"
value: ${{ steps.bump.outputs.bumpLevel }}

runs:
using: composite
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/version-bumping/npm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ outputs:
new-version:
description: "The new version"
value: ${{ steps.bump.outputs.new-version }}
bumpLevel:
description: "The computed SemVer bump level (major, minor, patch)"
value: ${{ steps.bump.outputs.bumpLevel }}

runs:
using: composite
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/version-bumping/python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ outputs:
new-version:
description: "The new version"
value: ${{ steps.bump.outputs.new-version }}
bumpLevel:
description: "The computed SemVer bump level (major, minor, patch)"
value: ${{ steps.bump.outputs.bumpLevel }}

runs:
using: composite
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/version-bumping/version-file/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ outputs:
new-version:
description: "The new version"
value: ${{ steps.bump.outputs.new-version }}
bumpLevel:
description: "The computed SemVer bump level (major, minor, patch)"
value: ${{ steps.bump.outputs.bumpLevel }}

runs:
using: composite
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
run: |
echo "Bumped: ${{ steps.version_bump.outputs.bumped }}"
echo "New Version: ${{ steps.version_bump.outputs.new-version }}"
echo "Bump Level: ${{ steps.version_bump.outputs.bumpLevel }}"
echo "### Python Test New Version: ${{ steps.version_bump.outputs.new-version }}" >> $GITHUB_STEP_SUMMARY
if [ -z "${{ steps.version_bump.outputs.bumped }}" ]; then
echo "Error: 'bumped' output is empty"
Expand Down Expand Up @@ -124,6 +125,7 @@ jobs:
run: |
echo "Bumped: ${{ steps.version_bump.outputs.bumped }}"
echo "New Version: ${{ steps.version_bump.outputs.new-version }}"
echo "Bump Level: ${{ steps.version_bump.outputs.bumpLevel }}"
echo "### NPM Test New Version: ${{ steps.version_bump.outputs.new-version }}" >> $GITHUB_STEP_SUMMARY
if [ -z "${{ steps.version_bump.outputs.bumped }}" ]; then
echo "Error: 'bumped' output is empty"
Expand Down Expand Up @@ -157,6 +159,7 @@ jobs:
run: |
echo "Bumped: ${{ steps.version_bump.outputs.bumped }}"
echo "New Version: ${{ steps.version_bump.outputs.new-version }}"
echo "Bump Level: ${{ steps.version_bump.outputs.bumpLevel }}"
echo "### Maven Test New Version: ${{ steps.version_bump.outputs.new-version }}" >> $GITHUB_STEP_SUMMARY
if [ -z "${{ steps.version_bump.outputs.bumped }}" ]; then
echo "Error: 'bumped' output is empty"
Expand Down Expand Up @@ -188,6 +191,7 @@ jobs:
run: |
echo "Bumped: ${{ steps.version_bump.outputs.bumped }}"
echo "New Version: ${{ steps.version_bump.outputs.new-version }}"
echo "Bump Level: ${{ steps.version_bump.outputs.bumpLevel }}"
echo "### Version File Test New Version: ${{ steps.version_bump.outputs.new-version }}" >> $GITHUB_STEP_SUMMARY
if [ -z "${{ steps.version_bump.outputs.bumped }}" ]; then
echo "Error: 'bumped' output is empty"
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ with:
| `pyproject-file` | Path to pyproject.toml (python only). | `pyproject.toml` | No |
| `version-file` | Path to version file (version-file only). | `VERSION` | No |

### Outputs

- `bumped`: True if version was bumped
- `new-version`: The new version number
- `bump`: The computed SemVer bump level (`major`, `minor`, or `patch`)

## Contributing

### Forked Repositories
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ outputs:
new-version:
description: "The new version"
value: ${{ steps.bump_maven.outputs.new-version || steps.bump_npm.outputs.new-version || steps.bump_python.outputs.new-version || steps.bump_version_file.outputs.new-version }}
bumpLevel:
description: "The computed SemVer bump level (major, minor, patch)"
value: ${{ steps.bump_maven.outputs.bumpLevel || steps.bump_npm.outputs.bumpLevel || steps.bump_python.outputs.bumpLevel || steps.bump_version_file.outputs.bumpLevel }}

runs:
using: "composite"
Expand Down