From 0197339eb068df2ef1a3084931951ad5cd7a2a93 Mon Sep 17 00:00:00 2001 From: Mathias Scheider Date: Thu, 1 Oct 2026 21:29:55 +0200 Subject: [PATCH] publish workflow --- .gitea/workflows/publish.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 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..3836b91 --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,36 @@ +name: Publish Package to Gitea + +on: + push: + tags: + - "v*" # This triggers the workflow when you push a tag like v1.0.0 + +jobs: + publish: + runs-on: ubuntu-latest # Or your specific runner label + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build package + run: python -m build + + - name: Publish to Gitea PyPI + env: + # These secrets must match the names you created in Gitea + TWINE_USERNAME: ${{ secrets.TWINE_PASSWORD }} + TWINE_PASSWORD: ${{ secrets.TWINE_USERNAME }} + # REPLACE THIS URL with your actual Gitea PyPI endpoint + TWINE_REPOSITORY_URL: "https://gitea.schneiderserver.site/api/packages/mathias2784/pypi" + run: | + twine upload --repository-url $TWINE_REPOSITORY_URL dist/*