-
Notifications
You must be signed in to change notification settings - Fork 10
40 lines (31 loc) · 948 Bytes
/
main.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
on: [push, pull_request]
name: main
jobs:
BuildTestPublish:
name: "Build, Test, and Publish"
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Clone tree
uses: actions/[email protected]
- name: Install dependencies
run: python3 -m pip install -U pip pylint
- name: Run pre-commit
uses: pre-commit/[email protected]
- name: Install
run: python3 -m pip install --user .[docs]
- name: Test
run: pushd tests; python3 -m unittest discover -v
- name: Build docs
run: make -C docs html
- name: Build sdist
run: python setup.py sdist
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}