Skip to content

Commit eea74f5

Browse files
committed
ci: add separate sdist building step to speed things up
1 parent c5c6d26 commit eea74f5

File tree

1 file changed

+31
-16
lines changed

1 file changed

+31
-16
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -131,26 +131,12 @@ jobs:
131131
name: wheels-${{ env.PLATFORM_TAG }}
132132
path: wheelhouse/*.whl
133133

134-
publish-pypi:
135-
needs: build-wheels
134+
build-sdist:
136135
runs-on: ubuntu-latest
137-
environment:
138-
name: pypi
139-
url: https://pypi.org/p/py-bitcoinkernel
140-
permissions:
141-
id-token: write
142-
143136
steps:
144137
- name: Checkout
145138
uses: actions/checkout@v4
146139

147-
- name: Download all wheels
148-
uses: actions/download-artifact@v4
149-
with:
150-
pattern: wheels-*
151-
path: dist
152-
merge-multiple: true
153-
154140
- name: Set up Python
155141
uses: actions/setup-python@v5
156142
with:
@@ -165,8 +151,37 @@ jobs:
165151
run: |
166152
sudo apt-get update -y
167153
sudo apt-get install -y libboost-dev
168-
python -m pip install dist/*.tar.gz
154+
python -m pip install dist/*.tar.gz pytest
169155
pytest
170156
157+
- name: Upload SDist
158+
uses: actions/upload-artifact@v4
159+
with:
160+
name: sdist
161+
path: dist/*.tar.gz
162+
163+
publish-pypi:
164+
needs: [build-wheels, build-sdist]
165+
runs-on: ubuntu-latest
166+
environment:
167+
name: pypi
168+
url: https://pypi.org/p/py-bitcoinkernel
169+
permissions:
170+
id-token: write
171+
172+
steps:
173+
- name: Download all wheels
174+
uses: actions/download-artifact@v4
175+
with:
176+
pattern: wheels-*
177+
path: dist
178+
merge-multiple: true
179+
180+
- name: Download SDist
181+
uses: actions/download-artifact@v4
182+
with:
183+
name: sdist
184+
path: dist
185+
171186
- name: Publish to PyPI
172187
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)