mirror of
https://github.com/derrod/legendary.git
synced 2026-05-27 11:16:41 +00:00
ci: automate pypi and releases drafting
This commit is contained in:
parent
fdfb7123ef
commit
0da024ef14
39
.github/workflows/python.yml
vendored
39
.github/workflows/python.yml
vendored
|
|
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in a new issue