Skip to content

Commit f1e77ff

Browse files
Refactor CI workflow for publishing and build steps
Updated the CI workflow to ensure compatibility with virtualenv and adjusted the build steps.
1 parent d9c9615 commit f1e77ff

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,8 @@ jobs:
108108
109109
publish:
110110
name: Publish
111-
needs: tag-release
112111
runs-on: ubuntu-latest
113-
env:
114-
HATCH_VENV_BUILD_REQUIREMENTS: "virtualenv<20.24.0"
112+
needs: tag-release
115113
steps:
116114
- uses: actions/checkout@v4
117115
with:
@@ -121,9 +119,16 @@ jobs:
121119
with:
122120
python-version: "3.11"
123121
- name: Install build tools
124-
run: pip install -U pip hatch hatchling twine
122+
run: |
123+
python -m pip install -U pip
124+
# Ensure a compatible virtualenv is installed in the main environment
125+
python -m pip install "virtualenv<20.24.0"
126+
python -m pip install hatch hatchling twine
125127
- name: Build sdist and wheel
126-
run: hatch build -t sdist -t wheel
128+
run: hatch build --no-hooks -t sdist -t wheel
129+
env:
130+
# This tells Hatch to not use its own isolated build environment
131+
HATCH_BUILD_HOOKS_ENABLE: false
127132
- name: Check distributions
128133
run: twine check dist/*
129134
- name: Publish to PyPI

0 commit comments

Comments
 (0)