-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 828 Bytes
/
python-package.yml
File metadata and controls
41 lines (32 loc) · 828 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: Python Package
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
# Install a specific version of uv.
version: "0.9.14"
- name: Install dependencies
run: |
uv python install 3.12
uv sync --all-extras
- name: Run tests
run: make test
- name: Build package
run: make build
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1