1- # SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22#
33# SPDX-License-Identifier: Apache-2.0
44
1919 - cuda-pathfinder
2020 - cuda-python
2121 - all
22- git-tag :
23- description : " The release git tag "
22+ version :
23+ description : " Version to release (e.g. 1.2.3) "
2424 required : true
2525 type : string
2626 run-id :
3939 - testpypi
4040 - pypi
4141
42+ env :
43+ TAG : ${{ fromJSON('{"cuda_bindings":"v","cuda_core":"cuda-core-v","cuda_pathfinder":"cuda-pathfinder-v","cuda_python":"cuda-python-v","all":"all-v"}')[inputs.component] }}${{ inputs.version }}
44+
4245defaults :
4346 run :
4447 shell : bash --noprofile --norc -xeuo pipefail {0}
6467 echo "Using provided run ID: ${{ inputs.run-id }}"
6568 echo "run-id=${{ inputs.run-id }}" >> $GITHUB_OUTPUT
6669 else
67- echo "Auto-detecting run ID for tag: ${{ inputs.git-tag }}"
68- RUN_ID=$(./ci/tools/lookup-run-id "${{ inputs.git-tag }}" "${{ github.repository }}")
70+ echo "Auto-detecting run ID for tag: ${{ env.TAG }}"
71+ RUN_ID=$(./ci/tools/lookup-run-id "${{ env.TAG }}" "${{ github.repository }}")
6972 echo "Auto-detected run ID: $RUN_ID"
7073 echo "run-id=$RUN_ID" >> $GITHUB_OUTPUT
7174 fi
9396
9497 found=0
9598 for idx in ${!tags[@]}; do
96- if [[ "${tags[$idx]}" == "${{ inputs.git-tag }}" ]]; then
97- echo "found existing release for ${{ inputs.git-tag }}"
99+ if [[ "${tags[$idx]}" == "${{ env.TAG }}" ]]; then
100+ echo "found existing release for ${{ env.TAG }}"
98101 found=1
99102 if [[ "${is_draft[$idx]}" != "true" ]]; then
100103 echo "the release note is not in draft state"
@@ -104,8 +107,8 @@ jobs:
104107 fi
105108 done
106109 if [[ "$found" == 0 ]]; then
107- echo "no release found for ${{ inputs.git-tag }}, creating draft release"
108- gh release create "${{ inputs.git-tag }}" --draft --repo "${{ github.repository }}" --title "Release ${{ inputs.git-tag }}" --notes "Release ${{ inputs.git-tag }}"
110+ echo "no release found for ${{ env.TAG }}, creating draft release"
111+ gh release create "${{ env.TAG }}" --draft --repo "${{ github.repository }}" --title "Release ${{ env.TAG }}" --notes "Release ${{ env.TAG }}"
109112 fi
110113
111114 doc :
@@ -124,7 +127,7 @@ jobs:
124127 with :
125128 build-ctk-ver : ${{ inputs.build-ctk-ver }}
126129 component : ${{ inputs.component }}
127- git-tag : ${{ inputs.git-tag }}
130+ git-tag : ${{ vars.TAG }}
128131 run-id : ${{ needs.determine-run-id.outputs.run-id }}
129132 is-release : true
130133
@@ -139,7 +142,7 @@ jobs:
139142 secrets : inherit
140143 uses : ./.github/workflows/release-upload.yml
141144 with :
142- git-tag : ${{ inputs.git-tag }}
145+ git-tag : ${{ vars.TAG }}
143146 run-id : ${{ needs.determine-run-id.outputs.run-id }}
144147 component : ${{ inputs.component }}
145148
0 commit comments