-
Notifications
You must be signed in to change notification settings - Fork 14
49 lines (40 loc) · 1.06 KB
/
build-and-release.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
46
47
48
49
name: Build and release
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
Test:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
python-version: 3.6
fetch-depth: 0
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
pip install -e .[tests]
- name: Show python dependencies
run: |
pip freeze
- name: Run tests
run: |
./run-tests.sh
- name: Build package
if: ${{ success() && github.event_name == 'push' }}
run: |
python setup.py sdist bdist_wheel
- name: Publish package
if: ${{ success() && github.event_name == 'push' }}
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_password }}