forked from slightlynybbled/tk_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (36 loc) · 1.13 KB
/
publishTest.yml
File metadata and controls
47 lines (36 loc) · 1.13 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
name: Publish 📦 to TestPyPI
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+-alpha[0-9]*
- v[0-9]+.[0-9]+.[0-9]+-beta[0-9]*
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]*
jobs:
build-n-publish:
name: Build and publish Python distributions to TestPyPI
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: Publish distribution 📦 to Test PyPI with UV
run: uv publish --token ${{ secrets.TEST_PYPI_API_TOKEN }} --publish-url https://test.pypi.org/legacy/