Skip to content

Commit d7536ef

Browse files
committed
MNT build and publish with build and github-actions
1 parent 8d5a196 commit d7536ef

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/deploy_pypi.yml

+17-9
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,21 @@ jobs:
3535
echo ${{ env.CURRENT }}
3636
echo ${{ env.EQUAL }}
3737
38-
- name: Build and publish
38+
- name: Install pypa/build
39+
run: >-
40+
python -m
41+
pip install
42+
build
43+
44+
- name: Build a source tarball
45+
run: >-
46+
python -m
47+
build
48+
--sdist
49+
--outdir dist/
50+
51+
- name: Publish
3952
if: ${{ env.EQUAL == 0 }}
40-
env:
41-
TWINE_USERNAME: __token__
42-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
43-
run: |
44-
python -m pip install --upgrade pip
45-
python -m pip install setuptools wheel twine
46-
python setup.py sdist bdist_wheel
47-
python -m twine upload dist/*
53+
uses: pypa/gh-action-pypi-publish@release/v1
54+
with:
55+
password: ${{ secrets.PYPI_PASSWORD }}

0 commit comments

Comments
 (0)