[llvm] workflows/release-binaries: Fixup Windows version string for release candidates (PR #215030)

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 06:19:46 PDT 2026


https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/215030

>From 65392dcac429acab43ed790459bf9667bcca518c Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 8 Aug 2026 15:28:41 -0700
Subject: [PATCH 01/10] Debug

---
 .github/workflows/release-binaries.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 799e56f200d44..37533b0678624 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -108,6 +108,7 @@ jobs:
         else
           if [ "$RUNNER_OS" = "Windows" ]; then
             release_version="$LLVM_VERSION_FROM_SOURCE"
+            release_version-"23.0.0.2"
           else
             release_version="${{ (github.event_name == 'pull_request' && format('PR{0}', github.event.pull_request.number)) || 'CI'}}-$GITHUB_SHA"
           fi

>From bbcc5ce3391a3776a0d6cd54ff3328284ee5f7da Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 8 Aug 2026 15:38:00 -0700
Subject: [PATCH 02/10] Fix typo

---
 .github/workflows/release-binaries.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 37533b0678624..4d5faab87fe59 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -108,7 +108,7 @@ jobs:
         else
           if [ "$RUNNER_OS" = "Windows" ]; then
             release_version="$LLVM_VERSION_FROM_SOURCE"
-            release_version-"23.0.0.2"
+            release_version="23.0.0.2"
           else
             release_version="${{ (github.event_name == 'pull_request' && format('PR{0}', github.event.pull_request.number)) || 'CI'}}-$GITHUB_SHA"
           fi

>From 76de6717e122d501c9f40ca8ef67b4080c3dda22 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 8 Aug 2026 15:38:17 -0700
Subject: [PATCH 03/10] Debug

---
 .github/workflows/release-binaries-all.yml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/.github/workflows/release-binaries-all.yml b/.github/workflows/release-binaries-all.yml
index 862300a8118e5..48454ee4f0d63 100644
--- a/.github/workflows/release-binaries-all.yml
+++ b/.github/workflows/release-binaries-all.yml
@@ -108,11 +108,7 @@ jobs:
         # We use ubuntu-22.04 rather than the latest version to make the built
         # binaries more portable (eg functional aginast older glibc).
         runs-on:
-          - ubuntu-22.04
-          - ubuntu-22.04-arm
-          - macos-14
           - windows-2022
-          - windows-11-arm
 
     uses: ./.github/workflows/release-binaries.yml
     with:

>From bc8bae12eede2d01bd7a14672dbba46c16c13693 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 8 Aug 2026 17:51:28 -0700
Subject: [PATCH 04/10] Programaatically change the version

---
 .github/workflows/release-binaries.yml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 4d5faab87fe59..7f4c33416b6f3 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
@@ -108,12 +109,18 @@ jobs:
         else
           if [ "$RUNNER_OS" = "Windows" ]; then
             release_version="$LLVM_VERSION_FROM_SOURCE"
-            release_version="23.0.0.2"
           else
             release_version="${{ (github.event_name == 'pull_request' && format('PR{0}', github.event.pull_request.number)) || 'CI'}}-$GITHUB_SHA"
           fi
           ref="$GITHUB_SHA"
         fi
+
+        if [ "$RUNNER_OS" = "Windows" ] && grep '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.
+          release_version="$LLVM_VERSION_MAJOR.0.0.$(cut -d c -f2 <<< $release_version)"
+        fi
+
         if [ -n "${{ inputs.upload }}" ]; then
           upload="${{ inputs.upload }}"
         else

>From 6aa9773f60510123511f1733adaed194a0b8e76d Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 8 Aug 2026 18:21:44 -0700
Subject: [PATCH 05/10] Debug

---
 .github/workflows/release-binaries.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 7f4c33416b6f3..d25dcd3affe23 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -120,6 +120,7 @@ jobs:
           # so we need to fixup the version number for release candidates.
           release_version="$LLVM_VERSION_MAJOR.0.0.$(cut -d c -f2 <<< $release_version)"
         fi
+        echo RELEASE VERSION: $release_version
 
         if [ -n "${{ inputs.upload }}" ]; then
           upload="${{ inputs.upload }}"

>From 48df00eef2c15fe813e610826bd1a4355ceb85c1 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 8 Aug 2026 18:25:06 -0700
Subject: [PATCH 06/10] Debug

---
 .github/workflows/release-binaries.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index d25dcd3affe23..ab5d9616f9be0 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -115,6 +115,8 @@ jobs:
           ref="$GITHUB_SHA"
         fi
 
+        echo RELEASE VERSION: $release_version
+        grep 'rc' <<< $release_version
         if [ "$RUNNER_OS" = "Windows" ] && grep '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.

>From 489011eadd848c234127499be5cf9e8f7e6c72cd Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 8 Aug 2026 20:08:51 -0700
Subject: [PATCH 07/10] Fixup

---
 .github/workflows/release-binaries-all.yml | 4 ++++
 .github/workflows/release-binaries.yml     | 4 +---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/release-binaries-all.yml b/.github/workflows/release-binaries-all.yml
index 48454ee4f0d63..862300a8118e5 100644
--- a/.github/workflows/release-binaries-all.yml
+++ b/.github/workflows/release-binaries-all.yml
@@ -108,7 +108,11 @@ jobs:
         # We use ubuntu-22.04 rather than the latest version to make the built
         # binaries more portable (eg functional aginast older glibc).
         runs-on:
+          - ubuntu-22.04
+          - ubuntu-22.04-arm
+          - macos-14
           - windows-2022
+          - windows-11-arm
 
     uses: ./.github/workflows/release-binaries.yml
     with:
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index ab5d9616f9be0..280539b1c5c71 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -115,14 +115,12 @@ jobs:
           ref="$GITHUB_SHA"
         fi
 
-        echo RELEASE VERSION: $release_version
-        grep 'rc' <<< $release_version
         if [ "$RUNNER_OS" = "Windows" ] && grep '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 be come 23.0.0.2
           release_version="$LLVM_VERSION_MAJOR.0.0.$(cut -d c -f2 <<< $release_version)"
         fi
-        echo RELEASE VERSION: $release_version
 
         if [ -n "${{ inputs.upload }}" ]; then
           upload="${{ inputs.upload }}"

>From 85315b2a9fc3a6b89c173876d1a886b49f1c0a7a Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 10 Aug 2026 11:57:46 -0700
Subject: [PATCH 08/10] Fix uploads

---
 .github/workflows/release-binaries.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 280539b1c5c71..21efb3b8945da 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -384,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 }}
           artifact-id: ${{ needs.build-release-package.outputs.artifact-id }}
           attestation-name: ${{ needs.prepare.outputs.attestation-name }}
           digest: ${{ needs.build-release-package.outputs.digest }}

>From a5aa84c94a80ed6ffd99dddfc38cc8a499123f76 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 10 Aug 2026 12:15:35 -0700
Subject: [PATCH 09/10] Some fixups

---
 .github/workflows/release-binaries.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 21efb3b8945da..96bd71e36934c 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -115,10 +115,10 @@ jobs:
           ref="$GITHUB_SHA"
         fi
 
-        if [ "$RUNNER_OS" = "Windows" ] && grep 'rc' <<< $release_version; then
+        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 be come 23.0.0.2
+          # 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
 

>From 5e1a10456ecc471b4dad2c8ccf7b17d4e9c4a67f Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Tue, 11 Aug 2026 06:19:32 -0700
Subject: [PATCH 10/10] Update .github/workflows/release-binaries.yml

Co-authored-by: Cullen Rhodes <cullen.rhodes at arm.com>
---
 .github/workflows/release-binaries.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 96bd71e36934c..36c04523fda06 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -386,7 +386,7 @@ jobs:
         with:
           # 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 }}
+          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-commits mailing list