[llvm-branch-commits] [llvm] release/23.x: workflows/release-binaries: Fixup Windows version string for release candidates (#215030) (PR #215560)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 11 06:37:19 PDT 2026
https://github.com/llvmbot created https://github.com/llvm/llvm-project/pull/215560
Backport d798a6dd1c30146a9cdee7eb4f5c2a35967cd991
Requested by: @tstellar
>From 1de42f4fcc07cb4163732f5bfc112c47b01b4044 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Tue, 11 Aug 2026 06:28:56 -0700
Subject: [PATCH] workflows/release-binaries: Fixup Windows version string for
release candidates (#215030)
The Wix installer does not support version strings with characters, so
we cannot use the -rc version strings on Windows. In order to work
around this, we change the version on the Windows builds from X.1.0-rcZ
to X.0.0.Z.
---------
Co-authored-by: Cullen Rhodes <cullen.rhodes at arm.com>
(cherry picked from commit d798a6dd1c30146a9cdee7eb4f5c2a35967cd991)
---
.github/workflows/release-binaries.yml | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index e7963876c469a..8b02e277e88ed 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -90,6 +90,7 @@ jobs:
id: vars
env:
LLVM_VERSION_FROM_SOURCE: ${{ steps.version-from-source.outputs.full-no-suffix }}
+ LLVM_VERSION_MAJOR: ${{ steps.version-from-source.outputs.major }}
INPUTS_RUNS_ON: ${{ inputs.runs-on }}
shell: bash
# In order for the test-release.sh script to run correctly, the LLVM
@@ -113,6 +114,14 @@ jobs:
fi
ref="$GITHUB_SHA"
fi
+
+ if [ "$RUNNER_OS" = "Windows" ] && grep -q 'rc' <<< "$release_version"; then
+ # The Wix installer generator does not support strings in the version number,
+ # so we need to fixup the version number for release candidates.
+ # For Example: 23.1.0-rc2 will become 23.0.0.2
+ release_version="$LLVM_VERSION_MAJOR.0.0.$(cut -d c -f2 <<< $release_version)"
+ fi
+
if [ -n "${{ inputs.upload }}" ]; then
upload="${{ inputs.upload }}"
else
@@ -375,7 +384,9 @@ jobs:
- name: Upload Artifacts
uses: $/.github/workflows/upload-release-artifact
with:
- release-version: ${{ needs.prepare.outputs.release-version }}
+ # We need to use the inputs.release-version here, because on Windows we
+ # need to fixup the rc version that's stored in needs.prepare.outputs.release-version
+ release-version: ${{ inputs.release-version || needs.prepare.outputs.release-version }}
artifact-id: ${{ needs.build-release-package.outputs.artifact-id }}
attestation-name: ${{ needs.prepare.outputs.attestation-name }}
digest: ${{ needs.build-release-package.outputs.digest }}
More information about the llvm-branch-commits
mailing list