-
Notifications
You must be signed in to change notification settings - Fork 33
43 lines (35 loc) · 935 Bytes
/
release.yml
File metadata and controls
43 lines (35 loc) · 935 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
42
43
---
name: release
on: push
permissions:
contents: read
checks: write
statuses: write
jobs:
pypi:
name: 'Build & publish package to PyPI'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
persist-credentials: false
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
activate-environment: true
enable-cache: true
python-version: "3.14"
- name: Set up Hatch and Twine
run: uv pip install hatch twine
- name: Build package
run: hatch build
- name: Validate package
run: twine check dist/*
- name: Publish package to PyPI
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}