39 lines
895 B
YAML
39 lines
895 B
YAML
# SPDX-FileCopyrightText: 2025 Alexander Kalinovsky <a@k8y.ru>
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
name: Publish to PyPI
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build-publish:
|
|
# Only run on stable releases (not alpha, beta, rc)
|
|
if: "!contains(gitea.ref, 'rc') && !contains(gitea.ref, 'a') && !contains(gitea.ref, 'b')"
|
|
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
UV_INDEX_URL: https://pypi.org/simple/
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Set up uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
enable-cache: true
|
|
python-version: "3.13"
|
|
- name: Build wheel & sdist
|
|
run: |
|
|
uv build
|
|
- name: Publish (PyPI)
|
|
run: |
|
|
uv publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
|
|
|