Skip to content

Commit 7865a3b

Browse files
committed
auto wrokflow to push to pypi
1 parent 75e422a commit 7865a3b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/release-wheels.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,27 @@ jobs:
124124
uses: softprops/action-gh-release@v2
125125
with:
126126
files: final/*.whl
127+
128+
############################################################
129+
# 5. Upload to PyPI
130+
############################################################
131+
upload-to-pypi:
132+
needs: release
133+
runs-on: ubuntu-latest
134+
135+
steps:
136+
- name: Download all wheel artifacts
137+
uses: actions/download-artifact@v4
138+
with:
139+
path: wheelhouse
140+
141+
- name: Flatten directory tree
142+
run: |
143+
mkdir final
144+
find wheelhouse -name "*.whl" -exec mv {} final/ \;
145+
146+
- name: Publish to PyPI
147+
uses: pypa/gh-action-pypi-publish@release/v1
148+
with:
149+
password: ${{ secrets.PYPI_API_TOKEN }}
150+
packages_dir: final

0 commit comments

Comments
 (0)