Skip to content

Commit a8d1284

Browse files
committed
Fix publishing jobs
It was incorrectly assumed that the PyPI publish GitHub Action was building the Python package before uploading it.
1 parent 0e171b2 commit a8d1284

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/test_and_publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,19 @@ jobs:
9494
- name: Check out code
9595
uses: actions/checkout@v3
9696

97+
- name: Set up Python
98+
uses: actions/setup-python@v4
99+
with:
100+
python-version: '3.x'
101+
102+
- name: Install dependencies
103+
run: |
104+
python -m pip install --upgrade pip
105+
pip install --upgrade build setuptools wheel
106+
107+
- name: Build Python package
108+
run: python -m build
109+
97110
- name: Publish to TestPyPI
98111
uses: pypa/gh-action-pypi-publish@v1.8.10
99112
with:
@@ -119,6 +132,19 @@ jobs:
119132
- name: Check out code
120133
uses: actions/checkout@v3
121134

135+
- name: Set up Python
136+
uses: actions/setup-python@v4
137+
with:
138+
python-version: '3.x'
139+
140+
- name: Install dependencies
141+
run: |
142+
python -m pip install --upgrade pip
143+
pip install --upgrade build setuptools wheel
144+
145+
- name: Build Python package
146+
run: python -m build
147+
122148
- name: Publish to PyPI
123149
uses: pypa/gh-action-pypi-publish@v1.8.10
124150
with:

0 commit comments

Comments
 (0)