-
Notifications
You must be signed in to change notification settings - Fork 14
43 lines (41 loc) · 1020 Bytes
/
build.yaml
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
name: mechanical-markdown
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
- release-*
jobs:
build:
runs-on: ubuntu-latest
env:
PYTHON_VER: 3.7
TWINE_USERNAME: ${{ secrets.PYPI_UPLOAD_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VER }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VER }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine tox
- name: Run Linter
run: |
tox -e flake8
- name: Run unit-tests
run: |
tox -e py37
- name: Upload test coverage
uses: codecov/codecov-action@v1
- name: Build and publish mechanical-markdown
if: github.event_name != 'pull_request'
run: |
python setup.py sdist bdist_wheel
twine upload dist/*