Skip to content

Commit acbf7e7

Browse files
committed
Use short python version for macos builds
1 parent 6a9e302 commit acbf7e7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/actions/setup-binary-builds/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ runs:
8383
# Set artifact name here since github actions doesn't have string manipulation tools
8484
# and "/" is not allowed in artifact names. //\//_ is to replace all forward slashes,
8585
# not just the first one
86-
echo "ARTIFACT_NAME=${REPOSITORY//\//_}_${REF//\//_}_${PYTHON_VERSION}_${CU_VERSION}_${ARCH}" >> "${GITHUB_ENV}"
86+
# Convert long python version (e.g. 3.10.19) to short major.minor version
87+
# (e.g. 3.10), while preserving special suffixes like "t" (e.g. 3.13t, 3.14t)
88+
SHORT_PYTHON_VERSION=$(echo "${PYTHON_VERSION}" | sed -E 's/^([0-9]+\.[0-9]+[a-z]?).*/\1/')
89+
echo "ARTIFACT_NAME=${REPOSITORY//\//_}_${REF//\//_}_${SHORT_PYTHON_VERSION}_${CU_VERSION}_${ARCH}" >> "${GITHUB_ENV}"
8790
- name: Setup miniconda (for pytorch_pkg_helpers)
8891
if: ${{ inputs.setup-miniconda == 'true' }}
8992
uses: conda-incubator/setup-miniconda@v3.1.1

0 commit comments

Comments
 (0)