nomyo/.forgejo/workflows/publish.yml

33 lines
716 B
YAML
Raw Permalink Normal View History

2026-04-03 12:05:58 +02:00
name: Publish to PyPI
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
publish:
runs-on: docker-amd64
2026-04-03 12:05:58 +02:00
container:
image: python:3.12-bookworm
2026-04-03 12:05:58 +02:00
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
2026-04-12 16:05:32 +02:00
- name: Build package
run: python -m build
2026-04-12 16:02:38 +02:00
2026-04-03 12:05:58 +02:00
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*