Skip to content

Commit 4a41555

Browse files
committed
CI: Run twine check, add publish step
1 parent 29661ce commit 4a41555

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

.github/workflows/wheels.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,29 @@ jobs:
8484
- uses: actions/download-artifact@v3
8585
with:
8686
path: dist/
87-
- run: ls -lR
88-
- run: mv dist/*/*.{tar.gz,whl} dist
89-
- run: rmdir dist/*/
90-
- run: ls -lR
87+
- name: Check artifacts
88+
run: ls -lR
89+
- name: Consolidate and re-check
90+
run: |
91+
mv dist/*/*.{tar.gz,whl} dist
92+
rmdir dist/*/
93+
ls -lR
94+
- run: pipx run twine dist/*
95+
96+
publish:
97+
runs-on: ubuntu-latest
98+
environment: "Package deployment"
99+
needs: [pre-publish]
100+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
101+
steps:
102+
- uses: actions/download-artifact@v3
103+
with:
104+
path: dist/
105+
- name: Consolidate artifacts
106+
run: |
107+
mv dist/*/*.{tar.gz,whl} dist
108+
rmdir dist/*/
109+
- uses: pypa/gh-action-pypi-publish@release/v1
110+
with:
111+
user: __token__
112+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)