-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (41 loc) · 1.14 KB
/
deploy.yml
File metadata and controls
51 lines (41 loc) · 1.14 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
name: Build & Upload Python Package to PyPI
on:
release:
types: [ published ]
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛒
uses: actions/checkout@v5
- name: Install uv 💜
uses: astral-sh/setup-uv@v6
- name: Install and run ruff 🐶
uses: astral-sh/ruff-action@v3
- name: Set up Python 🐍
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install dependencies 📦
run: |
uv sync --all-groups --frozen
- name: Lint with flake8 ❄️
run: |
uv run flake8 --config flake8.cfg
- name: Test with pytest ✅
run: |
uv run pytest tests
- name: Version replacement based on tag ↔️
if: github.ref_type == 'tag'
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/}
echo "Tag version: $TAG_VERSION"
uv version $TAG_VERSION
- name: Build and publish 🚀
env:
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN_PYPI }}
run: |
uv build
uv publish