1 parent 92e8edf commit 2a4562fCopy full SHA for 2a4562f
1 file changed
.github/workflows/release.yml
@@ -16,6 +16,8 @@ jobs:
16
- name: Checkout code
17
uses: actions/checkout@v4
18
with:
19
+ # Check out the tag that triggered the workflow so hatch-vcs sees exact tag
20
+ ref: ${{ github.ref }}
21
# Required for hatch-vcs to detect version from tags
22
fetch-depth: 0
23
@@ -45,6 +47,11 @@ jobs:
45
47
- name: Run tests
46
48
run: uv run pytest
49
50
+ - name: Verify we're on the tag (so hatch-vcs uses tag version)
51
+ run: |
52
+ git describe --exact-match HEAD || (echo "::error::HEAD is not exactly on tag ${{ github.ref_name }}"; exit 1)
53
+ echo "Building version from tag: ${{ github.ref_name }}"
54
+
55
- name: Clean previous builds
56
run: git clean -xfd dist build *.egg-info || true
57
0 commit comments