initial commit
Code Quality Pipeline / code-quality (push) Failing after 2m6s
Test Python Package / test (push) Failing after 15s
Type Check / type-check (push) Failing after 14s

This commit is contained in:
Brian Bjarke Jensen
2025-08-27 22:42:09 +02:00
parent 39d843d021
commit 95a8a29e2f
17 changed files with 807 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
# Gitea Actions workflow to build and publish Python package to Gitea Package Registry
name: Publish Python Package
on:
push:
tags:
- "v*.*.*"
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ vars.PYTHON_VERSION }}
- name: Install uv
run: pip install uv
- name: Update version in pyproject.toml to match tag
run: |
TAG_VERSION="${GITHUB_REF##*/}"
VERSION="${TAG_VERSION#v}"
sed -i.bak -E "s/^version = \".*\"/version = \"${VERSION}\"/" pyproject.toml
rm pyproject.toml.bak
- name: Build package
run: |
uv pip install build --system
uv build
- name: Publish to Gitea Package Registry
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.CI_RUNNER_TOKEN }}
TWINE_REPOSITORY_URL: ${{ vars.REPOSITORY_URL }}
run: |
uv pip install twine --system
twine upload dist/*