From 6e237695f1be5f9a8f8737d14dfa63929c4d7fc5 Mon Sep 17 00:00:00 2001 From: Sparsh Sam Date: Thu, 11 Jun 2026 13:00:32 -0400 Subject: [PATCH] fix: sanitize version string for PR builds On pull_request events, GitHub Actions checks out the merge ref (pull/N/merge), making GITHUB_REF_NAME resolve to 'N/merge'. The version injection logic used this raw ref name as-is, producing version strings like '12/merge-test'. The '/' character is invalid in Inno Setup's OutputBaseFileName, causing ISCC to fail with: Value of [Setup] section directive 'OutputBaseFileName' is invalid. Fix: use GITHUB_HEAD_REF (the actual PR branch name) as the version source when building from a pull_request event, falling back to GITHUB_REF_NAME for push events. Sanitize any remaining '/' for safety. Also corrects local git identity to Sparsh Sam for all future commits. --- .github/workflows/build-windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 29a5ecf..364fc39 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -42,7 +42,8 @@ jobs: elif [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then VERSION="${GITHUB_REF_NAME#v}" elif [[ "${GITHUB_REF_NAME}" != "main" ]]; then - VERSION="${GITHUB_REF_NAME}-test" + BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" + VERSION="${BRANCH//\//-}-test" else VERSION="0.0.0-dev" fi