Skip to content

Commit d5d812a

Browse files
authored
🐛 fix(release): use double quotes for tag variable expansion (#477)
The release workflow's "Create temporary tag for hatch-vcs" step uses single quotes around `${STEPS_V_OUTPUTS_VERSION}`, which prevents bash from expanding the variable. The tag is created as the literal string `${STEPS_V_OUTPUTS_VERSION}` instead of e.g. `4.9.5`. Because `hatch-vcs` never finds a valid version tag on the commit, it falls back to `git describe` and produces a version like `4.9.5.dev13+g104d28b48`. PyPI then rejects the upload with `400 Bad Request` since local version identifiers aren't allowed. Switching to double quotes fixes the expansion so the temporary tag matches the computed version and `hatch-vcs` produces a clean release version.
1 parent c2b0cee commit d5d812a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
BASE_SHA: ${{ github.event.pull_request.base.sha }}
5050
- name: Create temporary tag for hatch-vcs
5151
if: github.event.inputs.release != 'no' && github.event.inputs.release != null
52-
run: git tag '${STEPS_V_OUTPUTS_VERSION}'
52+
run: git tag "${STEPS_V_OUTPUTS_VERSION}"
5353
env:
5454
STEPS_V_OUTPUTS_VERSION: ${{ steps.v.outputs.version }}
5555
- name: Build package

0 commit comments

Comments
 (0)