initial commit
Code Quality Pipeline / code-quality (push) Failing after 1m49s
Test Python Package / test (push) Failing after 16s
Dependency Update Bot / update-check (push) Failing after 2m4s
Security Audit / safety (push) Failing after 1m26s

This commit is contained in:
Brian Bjarke Jensen
2025-08-31 17:50:04 +02:00
parent 56cad428b0
commit c789e33290
12 changed files with 1295 additions and 1 deletions
+42
View File
@@ -0,0 +1,42 @@
# 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: ${{ inputs.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 sync --no-dev
uv build
- name: Publish to Gitea Package Registry
env:
UV_PUBLISH_TOKEN: ${{ secrets.CI_RUNNER_TOKEN }}
UV_PUBLISH_URL: ${{ vars.REPOSITORY_URL }}
run: |
uv publish