Skip to content

Commit b8384df

Browse files
committed
refactor: add dynamic Xcode version selection in release workflow
1 parent 7ca4e09 commit b8384df

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
description: 'Tag version (e.g., v1.0.0 or leave empty to use git tag)'
1111
required: false
1212
default: ''
13+
xcode_version:
14+
description: 'Xcode version (e.g., latest-stable, 20.1)'
15+
required: false
16+
default: 'latest-stable'
1317

1418
jobs:
1519
release:
@@ -46,6 +50,18 @@ jobs:
4650
echo "tag_version=${TAG_VERSION}" >> $GITHUB_OUTPUT
4751
echo "Tag version: ${TAG_VERSION}"
4852
53+
- name: Determine Xcode version
54+
id: xcode
55+
shell: bash
56+
run: |
57+
if [[ "${{ github.event_name }}" == "workflow_dispatch" && -n "${{ github.event.inputs.xcode_version }}" ]]; then
58+
XCODE_VERSION="${{ github.event.inputs.xcode_version }}"
59+
else
60+
XCODE_VERSION="latest-stable"
61+
fi
62+
echo "xcode_version=${XCODE_VERSION}" >> $GITHUB_OUTPUT
63+
echo "Xcode version: ${XCODE_VERSION}"
64+
4965
- name: Checkout repository
5066
uses: actions/checkout@v4
5167
with:
@@ -56,7 +72,7 @@ jobs:
5672
- name: Select Xcode version
5773
uses: maxim-lobanov/setup-xcode@v1
5874
with:
59-
xcode-version: 26.2-beta
75+
xcode-version: ${{ steps.xcode.outputs.xcode_version }}
6076

6177
- name: Build VolumeGrid
6278
shell: bash

0 commit comments

Comments
 (0)