Skip to content

Commit e55d3e8

Browse files
committed
gh actions: update deploy script
1 parent 622825e commit e55d3e8

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

.github/workflows/deploy.yml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,34 @@ name: Deploy Package
77
on: [push]
88

99
jobs:
10-
build:
11-
12-
runs-on: ubuntu-latest
10+
build-n-publish:
11+
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
12+
runs-on: ubuntu-18.04
1313

1414
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-python@v2
17-
- uses: casperdcl/deploy-pypi@v2
15+
- uses: actions/checkout@master
16+
- name: Set up Python 3.9
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: 3.9
20+
21+
- name: Install pypa/build
22+
run: >-
23+
python -m
24+
pip install
25+
build
26+
--user
27+
- name: Build a binary wheel and a source tarball
28+
run: >-
29+
python -m
30+
build
31+
--sdist
32+
--wheel
33+
--outdir dist/
34+
.
35+
- name: Publish distribution 📦 to PyPI
36+
if: startsWith(github.ref, 'refs/tags')
37+
uses: pypa/gh-action-pypi-publish@master
1838
with:
1939
user: ${{ secrets.PYPI_USERNAME }}
2040
password: ${{ secrets.PYPI_TOKEN }}
21-
pip: wheel -w dist/ --no-deps .
22-
# only upload if a tag is pushed (otherwise just build & check)
23-
upload: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') }}

0 commit comments

Comments
 (0)