Skip to content

Workflow/tag release update #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 15, 2025
21 changes: 9 additions & 12 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,21 @@ jobs:
- bumps the revision in pom.xml to ${{ github.event.inputs.tag_version }}
Please review and merge.

- name: Clean workspace and checkout base branch
run: |
git checkout main
git reset --hard origin/main # Ensure we are clean relative to remote main

- name: Create branch for next development version
run: |
git checkout -b "release/bump-version-to-${{ github.event.inputs.new_revision }}" main

- name: Update revision in pom.xml for next development version
run: |
sed -i 's|<revision>.*</revision>|<revision>${{ github.event.inputs.new_revision }}</revision>|' ./pom.xml
git checkout -b "release/bump-version-to-${{ github.event.inputs.new_revision }}"
git add ./pom.xml
git commit -m "chore(release): Bump version to ${{ github.event.inputs.new_revision }} for continued development"

- name: Ensure remote branch exists for version bump
run: |
BRANCH="release/bump-version-to-${{ github.event.inputs.new_revision }}"
if git ls-remote --exit-code origin $BRANCH; then
echo "Remote branch exists."
else
echo "Remote branch does not exist. Creating it."
git push origin HEAD:$BRANCH
fi

- name: Create pull request for version bump
uses: peter-evans/create-pull-request@v7
env:
Expand All @@ -95,7 +93,6 @@ jobs:
branch: "release/bump-version-to-${{ github.event.inputs.new_revision }}"
base: "main"
title: "chore(release): Bump version to ${{ github.event.inputs.new_revision }} for development"
commit-message: "chore(release): Bump version to ${{ github.event.inputs.new_revision }} for ongoing development"
body: |
This pull request updates the pom.xml version to ${{
github.event.inputs.new_revision }} to start development for the next release.