From 8bcb415d8e1e7b8e32105df29151e5133f708607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leandro=20C=C3=A9sar?= Date: Mon, 22 Jul 2024 20:05:11 -0300 Subject: [PATCH] ci(github): update workflow to remove Python 3.7 and 3.12 --- .github/workflows/ci.yaml | 2 +- .github/workflows/release.yaml | 17 +++++++++++++++++ Makefile | 8 +------- noxfile.py | 2 +- 4 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ddfa7d2..10352b9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..3d173bb --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,17 @@ +name: release + +on: + release: + types: + - published + +jobs: + pypi-publish: + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/project/themoviedb/ + permissions: + id-token: write + steps: + - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/Makefile b/Makefile index d4aece3..0545d04 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: help install uninstall reinstall test lint format security clear release +.PHONY: help install uninstall reinstall test lint format security clear .DEFAULT_GOAL := help VENV = venv @@ -72,9 +72,3 @@ clear: @rm -fr .pytest_cache @rm -fr .mypy_cache @rm -fr .ruff_cache - -release: clear - @python setup.py sdist - @python setup.py bdist_wheel - @ls -l dist - @twine upload dist/* --verbose diff --git a/noxfile.py b/noxfile.py index eab29c1..75bd5c4 100644 --- a/noxfile.py +++ b/noxfile.py @@ -2,7 +2,7 @@ import nox -@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"]) +@nox.session(python=["3.8", "3.9", "3.10", "3.11"]) def tests(session: nox.Session) -> None: session.install("-r", "requirements-test.txt") session.run("pytest")