[llvm-branch-commits] [llvm] workflows/get-llvm-version: Make this action standalone (PR #218223)
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Aug 23 02:17:41 PDT 2026
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/218223
You can use this action now without first checking out the llvm-project source code.
>From a88fcdfcc82815f99d7eeb53e7013863b16d0a53 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sun, 23 Aug 2026 02:15:37 -0700
Subject: [PATCH] workflows/get-llvm-version: Make this action standalone
You can use this action now without first checking out the llvm-project
source code.
---
.github/workflows/get-llvm-version/action.yml | 13 +++++++++++--
.github/workflows/libclang-abi-tests.yml | 8 +-------
.github/workflows/llvm-abi-tests.yml | 8 +-------
.github/workflows/release-binaries.yml | 7 +------
4 files changed, 14 insertions(+), 22 deletions(-)
diff --git a/.github/workflows/get-llvm-version/action.yml b/.github/workflows/get-llvm-version/action.yml
index 6d3eeedf2a2b6..a1bda75bd3fd7 100644
--- a/.github/workflows/get-llvm-version/action.yml
+++ b/.github/workflows/get-llvm-version/action.yml
@@ -21,12 +21,21 @@ outputs:
runs:
using: "composite"
steps:
+ - uses: actions/checkout at df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
+ with:
+ persist-credentials: false
+ path: get-llvm-version
+ sparse-checkout: |
+ llvm/utils/release/get-llvm-version.sh
+ cmake/Modules/LLVMVersion.cmake
+ sparse-checkout-cone-mode: false
+
- name: Get Version
shell: bash
id: version
run: |
for v in major minor patch; do
- echo "$v=`llvm/utils/release/get-llvm-version.sh --$v`" >> $GITHUB_OUTPUT
+ echo "$v=`./get-llvm-version/llvm/utils/release/get-llvm-version.sh --$v`" >> $GITHUB_OUTPUT
done
- echo "full-no-suffix=$(llvm/utils/release/get-llvm-version.sh)" >> $GITHUB_OUTPUT
+ echo "full-no-suffix=$(./get-llvm-version/llvm/utils/release/get-llvm-version.sh)" >> $GITHUB_OUTPUT
diff --git a/.github/workflows/libclang-abi-tests.yml b/.github/workflows/libclang-abi-tests.yml
index a5fb1502be4ee..569a5ab33ec2e 100644
--- a/.github/workflows/libclang-abi-tests.yml
+++ b/.github/workflows/libclang-abi-tests.yml
@@ -37,15 +37,9 @@ jobs:
LLVM_VERSION_MINOR: ${{ steps.version.outputs.minor }}
LLVM_VERSION_PATCH: ${{ steps.version.outputs.patch }}
steps:
- - name: Checkout source
- uses: actions/checkout at df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- with:
- persist-credentials: false
- fetch-depth: 250
-
- name: Get LLVM version
id: version
- uses: ./.github/workflows/get-llvm-version
+ uses: $/.github/workflows/get-llvm-version
- name: Setup Variables
id: vars
diff --git a/.github/workflows/llvm-abi-tests.yml b/.github/workflows/llvm-abi-tests.yml
index 70175b0f39163..4469ee8fe93eb 100644
--- a/.github/workflows/llvm-abi-tests.yml
+++ b/.github/workflows/llvm-abi-tests.yml
@@ -37,15 +37,9 @@ jobs:
LLVM_VERSION_MINOR: ${{ steps.version.outputs.minor }}
LLVM_VERSION_PATCH: ${{ steps.version.outputs.patch }}
steps:
- - name: Checkout source
- uses: actions/checkout at df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- with:
- persist-credentials: false
- fetch-depth: 250
-
- name: Get LLVM version
id: version
- uses: ./.github/workflows/get-llvm-version
+ uses: $/.github/workflows/get-llvm-version
- name: Setup Variables
id: vars
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 98409a1c16b96..89066015ce3e0 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -69,11 +69,6 @@ jobs:
attestation-name: ${{ steps.vars.outputs.attestation-name }}
steps:
- - name: Checkout LLVM
- uses: actions/checkout at de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
-
- name: Validate Release Version
if: inputs.release-version != ''
uses: $/.github/workflows/validate-release-version
@@ -84,7 +79,7 @@ jobs:
# to fetch it here.
- id: version-from-source
if: runner.os == 'Windows'
- uses: ./.github/workflows/get-llvm-version
+ uses: $/.github/workflows/get-llvm-version
- name: Collect Variables
id: vars
More information about the llvm-branch-commits
mailing list