From 099b4c8a1de2c8df5a0f4104692d1b36e4f56f9d Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 14 May 2025 13:28:13 +0200 Subject: [PATCH] CI: Add action.yaml --- .gitea/workflows/action.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitea/workflows/action.yaml diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml new file mode 100644 index 00000000..e946b384 --- /dev/null +++ b/.gitea/workflows/action.yaml @@ -0,0 +1,34 @@ +name: Build and Publish +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set Up Python Environment + run: | + python3 -m venv venv # Create a virtual environment + source venv/bin/activate + pip install twine build + + - name: Build the Wheel + run: | + source venv/bin/activate + python -m build + + - name: Upload Package to Gitea PyPI + env: + TWINE_USERNAME: "__token__" # Username for Twine when using token-based auth + TWINE_PASSWORD: ${{ secrets.PIP_REPOSITORY_API_TOKEN }} # Use the secret for authentication + run: | + source venv/bin/activate + twine upload --repository-url https://gitea.psi.ch/api/packages/mx/pypi dist/* \ No newline at end of file