File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed
Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Wheels & Publish to PyPI
2+
3+ on :
4+ pull_request :
5+ workflow_dispatch :
6+ release :
7+ types : [published]
8+
9+ jobs :
10+ build-package :
11+ name : Build sdist
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Check out the repo
15+ uses : actions/checkout@v4
16+
17+ - name : Set up python
18+ uses : actions/setup-python@v5
19+ with :
20+ python-version : ' 3.10'
21+
22+ - name : Install python dependencies
23+ run : pip install build twine
24+
25+ - name : Build sdist and wheel
26+ run : |
27+ python -m build -o wheelhouse
28+
29+ - name : List and check sdist
30+ run : |
31+ ls -lh wheelhouse/
32+ twine check wheelhouse/*
33+
34+ - name : Upload artifacts
35+ uses : actions/upload-artifact@v4
36+ with :
37+ name : sdist
38+ path : ./wheelhouse/*.tar.gz
39+
40+ upload_to_pypi :
41+ name : Upload to PyPI
42+ runs-on : ubuntu-latest
43+ if : (github.event_name == 'release' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch')
44+ needs : [build-package]
45+ environment :
46+ name : pypi
47+ url : https://pypi.org/p/tensorflow-transform
48+ permissions :
49+ id-token : write
50+ steps :
51+ - name : Download artifacts
52+ uses : actions/download-artifact@v4
53+ with :
54+ merge-multiple : true
55+ path : wheels/
56+
57+ - name : List the build artifacts
58+ run : |
59+ ls -lAs wheels/
60+
61+ - name : Upload to PyPI
62+ uses : pypa/gh-action-pypi-publish@release/v1.9
63+ with :
64+ packages_dir : wheels/
You can’t perform that action at this time.
0 commit comments