Skip to content

Commit 844c31b

Browse files
committed
Add GitHub workflow for publishing releases on PyPI
1 parent ace813f commit 844c31b

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/workflows/publish_on_pypi.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish DBUtils on PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'Release-*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python: [2.7, 3.9]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Set up Python ${{ matrix.python }}
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python }}
22+
23+
- name: Build wheel and source tarball
24+
run: |
25+
pip install wheel
26+
python setup.py sdist bdist_wheel
27+
28+
- name: Publish a Python distribution to PyPI
29+
if: matrix.python == 3.9
30+
uses: pypa/gh-action-pypi-publish@release/v1
31+
with:
32+
user: __token__
33+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/test_with_tox.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@ jobs:
88
strategy:
99
matrix:
1010
python: [2.7, 3.6, 3.7, 3.8, 3.9]
11+
1112
steps:
1213
- uses: actions/checkout@v2
14+
1315
- name: Setup Python ${{ matrix.python }}
1416
uses: actions/setup-python@v2
1517
with:
1618
python-version: ${{ matrix.python }}
19+
1720
- run: pip install tox
21+
1822
- run: tox -e py
23+
1924
- if: matrix.python == 3.9
2025
run: TOXENV=flake8,manifest,docs,spell tox

0 commit comments

Comments
 (0)