From 07ce9d1686164b74aed2a50dae983b8603a61b22 Mon Sep 17 00:00:00 2001 From: Florian Date: Sat, 8 Nov 2025 10:21:59 +0100 Subject: [PATCH] Added PyPi package build process --- .gitea/workflows/build-local.yaml | 26 ++++++++++++++++++++++++++ .gitea/workflows/build.yaml | 26 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .gitea/workflows/build-local.yaml create mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/workflows/build-local.yaml b/.gitea/workflows/build-local.yaml new file mode 100644 index 0000000..ceb4d53 --- /dev/null +++ b/.gitea/workflows/build-local.yaml @@ -0,0 +1,26 @@ +name: Build and Publish Package + +on: + workflow_dispatch: + +jobs: + build: + runs-on: local + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build & Publish in container + uses: addnab/docker-run-action@v3 + with: + image: python:3.12-slim + options: -v $WORKSPACE:/app -w /app + shell: /usr/bin/bash + run: | + pip install build twine + python -m build + twine upload \ + --repository-url https://git.gansejunge.com/api/packages/notifier/pypi \ + -u ${{ secrets.PACKAGE_UPLOAD_USERNAME }} \ + -p ${{ secrets.PACKAGE_UPLOAD_TOKEN }} \ + dist/* \ No newline at end of file diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..bae5ed4 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,26 @@ +name: Build and Publish Package + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build & Publish in container + uses: addnab/docker-run-action@v3 + with: + image: python:3.12-slim + options: -v $WORKSPACE:/app -w /app + shell: /usr/bin/bash + run: | + pip install build twine + python -m build + twine upload \ + --repository-url https://git.gansejunge.com/api/packages/notifier/pypi \ + -u ${{ secrets.PACKAGE_UPLOAD_USERNAME }} \ + -p ${{ secrets.PACKAGE_UPLOAD_TOKEN }} \ + dist/*