-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (32 loc) · 868 Bytes
/
publish.yml
File metadata and controls
41 lines (32 loc) · 868 Bytes
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
name: Publish artifacts to PyPi
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
with:
submodules: true
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Installe Build Tools
run: |
sudo apt-get update && sudo apt-get install -y build-essential
- name: Install dependencies
run: |
uv sync
- name: Run tests
run: |
uv run pytest
- name: Build artifacts
run: |
uv build
- name: Upload artifacts
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
uv publish -t "$PYPI_TOKEN" --managed-python --check-url https://pypi.org/simple