Skip to content

Commit b8a673b

Browse files
Create ci.yml
1 parent 4529b96 commit b8a673b

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
python-version: [3.8, 3.9, 3.10]
18+
fail-fast: false
19+
20+
steps:
21+
- name: Check out code
22+
uses: actions/checkout@v2
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Install dependencies
30+
run: pip install -U tox-travis
31+
32+
- name: Run tests
33+
run: tox
34+
35+
deploy:
36+
runs-on: ubuntu-latest
37+
if: github.ref == 'refs/tags/*' && matrix.python-version == '3.9'
38+
steps:
39+
- name: Check out code
40+
uses: actions/checkout@v2
41+
42+
- name: Set up Python
43+
uses: actions/setup-python@v2
44+
with:
45+
python-version: 3.9
46+
47+
- name: Install dependencies
48+
run: pip install setuptools wheel twine
49+
50+
- name: Build and publish
51+
env:
52+
TWINE_USERNAME: __token__
53+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
54+
run: |
55+
python setup.py sdist bdist_wheel
56+
twine upload dist/*

0 commit comments

Comments
 (0)