Skip to content

Commit 7b8b921

Browse files
authored
Update python-publish.yml
1 parent 57e1a64 commit 7b8b921

File tree

1 file changed

+23
-35
lines changed

1 file changed

+23
-35
lines changed

.github/workflows/python-publish.yml

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,31 @@ on:
55
push:
66
branches:
77
- master
8-
9-
108
jobs:
11-
build-n-publish:
12-
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
13-
runs-on: ubuntu-18.04
14-
15-
9+
deploy:
10+
runs-on: ubuntu-20.04
11+
1612
steps:
17-
- uses: actions/checkout@master
18-
- name: Set up Python 3.9
19-
uses: actions/setup-python@v1
20-
with:
21-
python-version: 3.9
22-
23-
- name: Install pypa/build
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-python@v2
15+
- name: Install dependencies
16+
run: |
17+
python -m pip install --upgrade pip
18+
pip install setuptools wheel twine
19+
- name: Build and publish on testpypi
2420
working-directory: ./lib
25-
26-
run: >-
27-
python -m
28-
pip install
29-
build
30-
--user
31-
- name: Build a binary wheel and a source tarball
21+
env:
22+
TWINE_USERNAME: __token__
23+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
24+
run: |
25+
python setup.py sdist bdist_wheel
26+
twine upload testpypi dist/*
27+
- name: Build and publish
3228
working-directory: ./lib
33-
34-
run: >-
35-
python -m
36-
build
37-
--sdist
38-
--wheel
39-
--outdir dist/
40-
.
41-
42-
- name: Publish distribution 📦 to PyPI
43-
uses: pypa/gh-action-pypi-publish@master
44-
with:
45-
password: ${{ secrets.PYPI_API_TOKEN }}
46-
29+
env:
30+
TWINE_USERNAME: __token__
31+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
32+
run: |
33+
python setup.py sdist bdist_wheel
34+
twine upload dist/*
4735

0 commit comments

Comments
 (0)