From 45145c5107da7340ad5708a17131b02be4f4098f Mon Sep 17 00:00:00 2001 From: Walter Oggioni Date: Mon, 29 Jul 2024 04:52:50 +0800 Subject: [PATCH] added gitea pipeline --- .gitea/workflows/build.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..7f0c0e1 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,29 @@ +name: CI +on: + push: + branches: [ master ] +jobs: + build: + runs-on: woryzen + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + cache: 'pip' + - name: Create virtualenv + run: | + python -m venv .venv + .venv/bin/pip install -r requirements.txt +# - name: Run unit tests +# run: .venv/bin/python -m unittest discover -s tests + - name: Execute build + run: | + .venv/bin/python -m build + - name: Publish artifacts + env: + TWINE_REPOSITORY_URL: ${{ vars.PYPI_REGISTRY_URL }} + TWINE_USERNAME: ${{ vars.PUBLISHER_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PUBLISHER_TOKEN }} + run: | + .venv/bin/python -m twine upload --repository gitea dist/*{.whl,tar.gz}