ci: automate pypi and releases drafting

This commit is contained in:
Paweł Lidwin 2026-05-23 15:37:18 +02:00
parent fdfb7123ef
commit 0da024ef14
No known key found for this signature in database
GPG key ID: 7F66B68FB41B22DA

View file

@ -3,6 +3,7 @@ name: Python
on:
push:
branches: [ '*' ]
tags: [ '*.*.*' ]
pull_request:
branches: [ '*' ]
@ -98,3 +99,41 @@ jobs:
with:
name: ${{ runner.os }}-${{ runner.arch }}-package
path: dist/legendary
# Publishing
pypi:
runs-on: ubuntu-latest
environment:
name: pypi
if: startsWith(github.ref, 'refs/tags/')
env:
UV_SYSTEM_PYTHON: 1
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version-file: "pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Build
run: uv build
- name: Publish
run: uv publish
release:
permissions:
contents: write
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [pyinstaller, zipapp, pypi]
steps:
- name: Download builds
uses: actions/download-artifact@v8