From 6077bdb19c2481a1905d4f056b80b8a74e179dec Mon Sep 17 00:00:00 2001 From: trueold89 Date: Sun, 9 Jun 2024 01:18:51 +0300 Subject: [PATCH] Add python-workflow --- .gitea/workflows/python-build.yml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .gitea/workflows/python-build.yml diff --git a/.gitea/workflows/python-build.yml b/.gitea/workflows/python-build.yml new file mode 100644 index 0000000..54f953e --- /dev/null +++ b/.gitea/workflows/python-build.yml @@ -0,0 +1,35 @@ +name: Build Python Package + +on: + push: + branches: + - main + +jobs: + build: + runs-on: python-3.12.3-alpine3.19 + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Create and activate virtual environment + run: | + python -m venv venv + source venv/bin/activate + + - name: Install dependencies + run: | + source venv/bin/activate + pip install --upgrade pip + pip install setuptools discord.py + + - name: Build the package + run: | + source venv/bin/activate + python setup.py sdist + + - name: Archive the package + uses: actions/upload-artifact@v2 + with: + name: dist + path: dist/*.tar.gz