File tree Expand file tree Collapse file tree 2 files changed +17
-22
lines changed Expand file tree Collapse file tree 2 files changed +17
-22
lines changed Original file line number Diff line number Diff line change @@ -33,16 +33,10 @@ jobs:
3333 python-version : ${{ matrix.python-version }}
3434 - name : Display Python version
3535 run : python -c "import sys; print(sys.version)"
36- - name : Create virtual environment
37- run : tools/ci/create_venv.sh
38- - name : Build sdist
39- run : tools/ci/build_archive.sh
40- env :
41- INSTALL_TYPE : sdist
42- - name : Build wheel
43- run : tools/ci/build_archive.sh
44- env :
45- INSTALL_TYPE : wheel
36+ - name : Install build
37+ run : python -m pip install build
38+ - name : Build sdist and wheel
39+ run : python -m build
4640 - name : Test PyPI upload
4741 uses : pypa/gh-action-pypi-publish@master
4842 with :
Original file line number Diff line number Diff line change @@ -11,21 +11,22 @@ echo "INSTALL_TYPE = $INSTALL_TYPE"
1111
1212set -x
1313
14- if [ " $INSTALL_TYPE " == " sdist" ]; then
15- python setup.py egg_info # check egg_info while we're here
16- python setup.py sdist
17- export ARCHIVE=$( ls dist/* .tar.gz )
18- elif [ " $INSTALL_TYPE " == " wheel" ]; then
19- python setup.py bdist_wheel
20- export ARCHIVE=$( ls dist/* .whl )
21- elif [ " $INSTALL_TYPE " == " archive" ]; then
22- export ARCHIVE=" package.tar.gz"
14+ if [ " $INSTALL_TYPE " = " sdist" -o " $INSTALL_TYPE " = " wheel" ]; then
15+ python -m build
16+ elif [ " $INSTALL_TYPE " = " archive" ]; then
17+ ARCHIVE=" /tmp/package.tar.gz"
2318 git archive -o $ARCHIVE HEAD
24- elif [ " $INSTALL_TYPE " == " pip" ]; then
25- export ARCHIVE=" ."
2619fi
2720
28- if [ " ${ARCHIVE: 0: 5} " = " dist/" ]; then
21+ if [ " $INSTALL_TYPE " = " sdist" ]; then
22+ ARCHIVE=$( ls $PWD /dist/* .tar.gz )
23+ elif [ " $INSTALL_TYPE " = " wheel" ]; then
24+ ARCHIVE=$( ls $PWD /dist/* .whl )
25+ elif [ " $INSTALL_TYPE " = " pip" ]; then
26+ ARCHIVE=" $PWD "
27+ fi
28+
29+ if [ " $INSTALL_TYPE " = " sdist" -o " $INSTALL_TYPE " = " wheel" ]; then
2930 python -m pip install twine
3031 python -m twine check $ARCHIVE
3132fi
You can’t perform that action at this time.
0 commit comments