Skip to content

Commit aa0761e

Browse files
authored
Update release.yml
1 parent 4c488ec commit aa0761e

File tree

1 file changed

+31
-23
lines changed

1 file changed

+31
-23
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
1-
name: Release
1+
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
22

33
on:
44
release:
5-
types: [released]
6-
5+
types: [prereleased,released]
6+
77
jobs:
8-
deploy:
9-
runs-on: ubuntu-20.04
8+
build-n-publish:
9+
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
10+
runs-on: ubuntu-18.04
1011
steps:
11-
- uses: actions/checkout@v2
12-
- name: Set up Python
13-
uses: actions/setup-python@v2
14-
with:
15-
python-version: "3.7"
16-
- name: Install dependencies
17-
run: |
18-
python -m pip install --upgrade pip
19-
pip install setuptools wheel twine packaging
20-
- name: Create distribution files
21-
run: python setup.py sdist
22-
- name: Publish distribution to PyPI
23-
if: startsWith(github.ref, 'refs/tags')
24-
uses: pypa/gh-action-pypi-publish@master
25-
with:
26-
password: ${{ secrets.pypi_password }}
27-
verbose: true
28-
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v1
15+
with:
16+
python-version: "3.7"
17+
- name: Install pypi/build
18+
run: >-
19+
python -m
20+
pip install
21+
build
22+
--user
23+
- name: Build a binary wheel and a source tarball
24+
run: >-
25+
python -m
26+
build
27+
--sdist
28+
--wheel
29+
--outdir dist/
30+
.
31+
- name: Publish distribution 📦 to PyPI
32+
if: startsWith(github.ref, 'refs/tags')
33+
uses: pypa/gh-action-pypi-publish@master
34+
with:
35+
password: ${{ secrets.pypi_password }}
36+
verbose: true

0 commit comments

Comments
 (0)