diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2bccb54..755feca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,6 +45,7 @@ jobs: version: ${{ steps.check.outputs.version }} tag: ${{ steps.check.outputs.tag }} target: ${{ steps.check.outputs.target }} + python_version: ${{ steps.check.outputs.python_version }} steps: - uses: actions/checkout@v4 with: @@ -181,7 +182,7 @@ jobs: - name: Verify exactly one wheel per supported Python env: - VERSION: ${{ needs.validate-version.outputs.version }} + VERSION: ${{ needs.validate-version.outputs.python_version }} # Windows defaults to pwsh, which needs $env:VERSION. Run under Git Bash # so the shared "$VERSION" expansion works on every matrix entry. shell: bash @@ -192,7 +193,7 @@ jobs: - name: Install and smoke every wheel in a matching venv env: - VERSION: ${{ needs.validate-version.outputs.version }} + VERSION: ${{ needs.validate-version.outputs.python_version }} # Same pwsh caveat as above: this step expands "$VERSION" in bash. shell: bash run: >- @@ -300,7 +301,7 @@ jobs: - name: Run the functional smoke test env: - VERSION: ${{ needs.validate-version.outputs.version }} + VERSION: ${{ needs.validate-version.outputs.python_version }} run: | source .venv-pyodide/bin/activate wheel=$(ls dist/*.whl) @@ -338,7 +339,7 @@ jobs: - name: Verify the sdist bundles the workspace crates env: - VERSION: ${{ needs.validate-version.outputs.version }} + VERSION: ${{ needs.validate-version.outputs.python_version }} run: | archive=$(ls crates/tokie-python/dist/*.tar.gz) python scripts/release/smoke_wheel.py verify-sdist \ @@ -347,7 +348,7 @@ jobs: - name: Install the sdist in a clean venv and smoke it env: - VERSION: ${{ needs.validate-version.outputs.version }} + VERSION: ${{ needs.validate-version.outputs.python_version }} run: | archive=$(ls crates/tokie-python/dist/*.tar.gz) py=$(uv python find 3.12) diff --git a/scripts/release/check_versions.py b/scripts/release/check_versions.py index dc6a041..0b32f12 100755 --- a/scripts/release/check_versions.py +++ b/scripts/release/check_versions.py @@ -305,6 +305,7 @@ def main(argv: list[str] | None = None) -> int: handle.write(f"version={version}\n") handle.write(f"tag={tag}\n") handle.write(f"target={target}\n") + handle.write(f"python_version={versions[PYTHON_PACKAGE]}\n") print(f"release target: {target}") print(f"release version: {version}") diff --git a/scripts/release/test_release_scripts.py b/scripts/release/test_release_scripts.py index af992f1..32c54d0 100755 --- a/scripts/release/test_release_scripts.py +++ b/scripts/release/test_release_scripts.py @@ -358,7 +358,7 @@ def test_python_github_outputs_are_exact(self) -> None: self.assertEqual(code, 0) self.assertEqual( output.read_text(encoding="utf-8"), - "version=0.3.0\ntag=python-v0.3.0\ntarget=python\n", + "version=0.3.0\ntag=python-v0.3.0\ntarget=python\npython_version=0.3.0\n", ) def test_all_github_outputs_are_exact(self) -> None: @@ -373,7 +373,7 @@ def test_all_github_outputs_are_exact(self) -> None: self.assertEqual(code, 0) self.assertEqual( output.read_text(encoding="utf-8"), - "version=0.2.0\ntag=v0.2.0\ntarget=all\n", + "version=0.2.0\ntag=v0.2.0\ntarget=all\npython_version=0.2.0\n", )