-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 871 Bytes
/
Copy pathpython-app.yml
File metadata and controls
40 lines (37 loc) · 871 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
name: Python application
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [published]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Ruff format
run: uv run ruff format --check
- name: Ruff check
run: uv run ruff check
- name: Test
run: uv run pytest
- name: Verify pip install
run: |
uv build
pip install dist/*.whl
publish:
needs: check
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Build
run: uv build
- name: Publish to PyPi
run: uv publish