forked from slightlynybbled/tk_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (40 loc) · 1.19 KB
/
publish.yml
File metadata and controls
52 lines (40 loc) · 1.19 KB
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
name: Publish 📦 to PyPI
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
build-n-publish:
name: Build and publish Python distributions to PyPI
runs-on: ubuntu-latest
steps:
- name: Install xvfb
run: sudo apt-get install -y xvfb
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Create venv
run: uv venv
- name: Install tk_tools
run: uv pip install -e .
- name: Execute Tests
run: xvfb-run -a uv run pytest -v tests/ --cov=tk_tools
- name: Build wheel file in `dist/`
run: uv build
- name: Build docs
run: |
cd docs/
uv run sphinx-build -b html . ./html
# - name: Deploy documentation
# if: ${{ github.event_name == 'push' }}
# uses: JamesIves/[email protected]
# with:
# branch: gh-pages
# folder: gh-pages
- name: Publish distribution 📦 to PyPI with UV
run: uv publish --token ${{ secrets.PYPI_API_TOKEN }}