diff --git a/.github/workflows/python-wheels-publish-test.yml b/.github/workflows/python-wheels-publish-test.yml
index 6b46aef164..8a9df35c86 100644
--- a/.github/workflows/python-wheels-publish-test.yml
+++ b/.github/workflows/python-wheels-publish-test.yml
@@ -43,6 +43,8 @@ jobs:
       - name: Create sdist
         # Only create it once.
         if: ${{ matrix.os == 'ubuntu-latest' }}
+        env:
+          OPENEXR_RELEASE_CANDIDATE_TAG: ${{ github.ref_name }
         run: pipx run build --sdist . --outdir wheelhouse
 
       - name: Build wheel
diff --git a/.github/workflows/python-wheels-publish.yml b/.github/workflows/python-wheels-publish.yml
index 2330847df3..fdfd9553d1 100644
--- a/.github/workflows/python-wheels-publish.yml
+++ b/.github/workflows/python-wheels-publish.yml
@@ -39,6 +39,8 @@ jobs:
       - name: Create sdist
         # Only create it once.
         if: ${{ matrix.os == 'ubuntu-latest' }}
+        env:
+          OPENEXR_RELEASE_CANDIDATE_TAG: ${{ github.ref_name }
         run: pipx run build --sdist . --outdir wheelhouse
 
       - name: Build wheel