feat: add workflow to publish to pypi

This commit is contained in:
Alpha Nerd 2026-04-03 12:05:58 +02:00
parent ec3f3a64cc
commit 15b578388c
Signed by: alpha-nerd
SSH key fingerprint: SHA256:QkkAgVoYi9TQ0UKPkiKSfnerZy2h4qhi3SVPXJmBN+M
2 changed files with 33 additions and 1 deletions

View file

@ -0,0 +1,32 @@
name: Publish to PyPI
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
publish:
runs-on: docker
container:
image: python:3.12-bookworm
steps:
- name: Checkout repository
run: |
git clone --depth=1 --branch "${{ github.ref_name }}" \
"https://oauth2:${{ github.token }}@bitfreedom.net/code/${{ github.repository }}.git" \
.
- name: Install build tools
run: pip install build twine
- name: Build package
run: python -m build
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*

View file

@ -48,5 +48,5 @@ Documentation = "https://github.com/nomyo-ai/nomyo/doc"
Repository = "https://github.com/nomyo-ai/nomyo" Repository = "https://github.com/nomyo-ai/nomyo"
Issues = "https://github.com/nomyo-ai/nomyo/issues" Issues = "https://github.com/nomyo-ai/nomyo/issues"
[tool.setuptools] [tool.hatch.build.targets.wheel]
packages = ["nomyo"] packages = ["nomyo"]