-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (45 loc) · 1.07 KB
/
cicd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: cicd
on:
push:
pull_request:
release:
types: published
jobs:
ci:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8]
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and run tests
run: |
python -V
make setup
cd:
runs-on: ubuntu-latest
needs: ci
if: github.event_name == 'release'
steps:
- uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.8'
- name: Install dependencies and build
run: |
echo "$GITHUB_REF"
python -V
pip install -U pip setuptools wheel twine
python ./setup.py sdist bdist_wheel
- name: Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload ./dist/*