From b520e4fdb2381a6891a584671e22649da86f30ea Mon Sep 17 00:00:00 2001 From: Brian Bjarke Jensen Date: Thu, 8 Jan 2026 08:40:23 +0100 Subject: [PATCH] added script to publish python package --- .gitea/workflows/publish.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .gitea/workflows/publish.yml diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..857726c --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,35 @@ +# 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: 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 -- 2.54.0