-
Notifications
You must be signed in to change notification settings - Fork 6
74 lines (74 loc) · 1.87 KB
/
ci.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: CI
on:
- push
- pull_request
jobs:
test:
name: Tests
if: always()
runs-on: ubuntu-latest
env:
PYTHON: 3.12
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@main
with:
python-version: 3.12
- name: Deps
run: 'pip install pyright -e .'
- name: Analyze
run: 'pyright sound'
audit:
name: Pip Audit
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@main
with:
python-version: '3.11'
- name: Update Build Deps
run: pip install -U setuptools pip wheel
- name: install
run: pip install .
- uses: pypa/[email protected]
docs:
name: Build Documentation
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@main
with:
python-version: '3.12'
- name: OS Deps
run: 'sudo apt-get install -y libportaudio2'
- name: Deps
run: 'pip install -e . -r ./docs/requirements.txt'
- name: Build Docs
run: 'make -C docs html'
release:
name: Release to PyPI
needs: ["test", "audit", "docs"]
if: "github.event_name == 'push' && github.repository == 'rhelmot/sound-machine' && startsWith(github.ref, 'refs/tags/v') && success()"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@main
with:
python-version: '3.12'
- name: Deps
run: 'pip install -U build wheel semver'
- name: Fix Version
run: './release.py finalize'
- name: Build
run: 'python -m build'
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}