Skip to content

Commit 942fd77

Browse files
authored
add twine check and upload to PyPi
1 parent 15f7d5d commit 942fd77

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

.github/workflows/build.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,32 @@ jobs:
4343
path: dist/*.whl
4444

4545
- name: Install built wheel
46-
run: pip install dist/*.whl
46+
run: |
47+
twine check dist/*
48+
pip install dist/*.whl
49+
50+
upload_to_pypi:
51+
name: Upload to PyPI
52+
runs-on: ubuntu-latest
53+
if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch')
54+
needs: [build]
55+
environment:
56+
name: pypi
57+
url: https://pypi.org/p/tensorflow-data-validation/
58+
permissions:
59+
id-token: write
60+
steps:
61+
- name: Retrieve wheels
62+
uses: actions/download-artifact@v4.1.8
63+
with:
64+
merge-multiple: true
65+
path: wheels
66+
67+
- name: List the build artifacts
68+
run: |
69+
ls -lAs wheels/
70+
71+
- name: Upload to PyPI
72+
uses: pypa/gh-action-pypi-publish@release/v1.9
73+
with:
74+
packages_dir: wheels/

0 commit comments

Comments
 (0)