From 6032c1a1a726da60073efb388b417e8185bbfb00 Mon Sep 17 00:00:00 2001 From: Egor Deev Date: Fri, 2 Oct 2026 20:42:37 +0000 Subject: [PATCH] =?UTF-8?q?CI=20=D0=BD=D0=B0=20Python=203.9=E2=80=933.13?= =?UTF-8?q?=20=D1=81=D0=BE=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=BE=D0=B9=20?= =?UTF-8?q?=D0=BF=D0=B0=D0=BA=D0=B5=D1=82=D0=B0;=20=D0=BF=D1=83=D0=B1?= =?UTF-8?q?=D0=BB=D0=B8=D0=BA=D0=B0=D1=86=D0=B8=D1=8F=20=D0=BD=D0=B0=20PyP?= =?UTF-8?q?I=20=D0=BF=D0=BE=20=D1=82=D0=B5=D0=B3=D1=83=20v*?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..207f16a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - run: pip install -e . -r requirements-dev.txt + - name: Ruff + run: ruff check . + - name: Тесты + run: pytest -q + - name: Сборка пакета + run: python -m build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7aafae1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release + +on: + push: + tags: ["v*"] + +jobs: + pypi: + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - run: pip install build + - run: python -m build + - name: Публикация на PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} + - name: Пакет в релиз GitHub + env: + GH_TOKEN: ${{ github.token }} + run: gh release upload "$GITHUB_REF_NAME" dist/* --clobber || true