-
Notifications
You must be signed in to change notification settings - Fork 20
41 lines (34 loc) · 858 Bytes
/
Copy pathdeploy.yaml
File metadata and controls
41 lines (34 loc) · 858 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: Build package and push to PyPi
on:
workflow_dispatch:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: read
# Required for PyPI Trusted Publishing (OIDC); no API token needed.
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
fetch-depth: 0 # Includes getting tags
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.13"
enable-cache: true
- name: Build package
run: uv build
- name: Publish package
if: github.event_name != 'workflow_dispatch'
run: uv publish
- uses: actions/upload-artifact@v7
if: always()
with:
name: dist
path: dist/