Skip to content

Commit

Permalink
ci(github): update workflow to remove Python 3.7 and 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
leandcesar committed Jul 23, 2024
1 parent 61eb384 commit 0ecb7d4
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Install pypa/setuptools
run: >-
python -m
pip install wheel
- name: Extract tag name
id: tag
run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Update version in setup.py
run: >-
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py
- name: Build a binary wheel
run: >-
python setup.py sdist bdist_wheel
- uses: pypa/gh-action-pypi-publish@release/v1
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author="Leandro César",
author_email="[email protected]",
url="https://github.com/leandcesar/themoviedb",
version="0.4.0",
version="{{VERSION_PLACEHOLDER}}",
license="MIT",
python_requires=">=3.8",
packages=find_packages(include=["themoviedb", "themoviedb.*"]),
Expand All @@ -36,7 +36,6 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
keywords=[
"tmdb",
Expand Down

0 comments on commit 0ecb7d4

Please sign in to comment.