From 7a17fcc737430622c9f7c759556fb3adc83ce29e Mon Sep 17 00:00:00 2001 From: Martijn Verburg Date: Fri, 27 Feb 2026 12:08:22 +1300 Subject: [PATCH] Update release workflow to set gradle.properties version on manual dispatch When the release workflow is triggered manually via workflow_dispatch, the gradle.properties version is now updated to match the entered tag name (with the v prefix stripped). This runs before validation in the create_release job and before the build in the build_release job. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/gradle-release.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/gradle-release.yml b/.github/workflows/gradle-release.yml index dd9c6081f9b..1770087294e 100644 --- a/.github/workflows/gradle-release.yml +++ b/.github/workflows/gradle-release.yml @@ -28,6 +28,16 @@ jobs: with: ref: ${{ inputs.tag_name || github.ref }} + - name: Update gradle.properties with release version + if: github.event_name == 'workflow_dispatch' + run: | + TAG_NAME="${{ inputs.tag_name }}" + VERSION="${TAG_NAME#v}" + echo "Updating gradle.properties version to ${VERSION}" + sed -i "s/^version=.*/version=${VERSION}/" gradle.properties + echo "Updated gradle.properties:" + grep '^version=' gradle.properties + - name: Validate tag matches gradle.properties version run: | TAG_NAME="${{ inputs.tag_name || github.ref_name }}" @@ -100,6 +110,17 @@ jobs: with: ref: ${{ inputs.tag_name || github.ref }} + - name: Update gradle.properties with release version + if: github.event_name == 'workflow_dispatch' + run: | + TAG_NAME="${{ inputs.tag_name }}" + VERSION="${TAG_NAME#v}" + echo "Updating gradle.properties version to ${VERSION}" + sed -i.bak "s/^version=.*/version=${VERSION}/" gradle.properties + rm -f gradle.properties.bak + echo "Updated gradle.properties:" + grep '^version=' gradle.properties + - name: Update PCGenProp.properties with release version and date run: | PROPS_FILE="code/src/resources/pcgen/system/prop/PCGenProp.properties"