diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 00000000..c98f8c60 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,19 @@ +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + token: ${{ secrets.MIDEA_GITHUB_PAT }} + release-type: python diff --git a/midealocal/version.py b/midealocal/version.py new file mode 100644 index 00000000..e4ad5883 --- /dev/null +++ b/midealocal/version.py @@ -0,0 +1,3 @@ +"""Midea Local Version.""" + +__version__ = "1.1.4" diff --git a/setup.py b/setup.py index 736d6ef3..dbef07c0 100644 --- a/setup.py +++ b/setup.py @@ -12,9 +12,15 @@ with requirements.open(encoding="utf-8") as fp: requires = fp.read().splitlines() +version: dict = {} +version_file = Path("midealocal", "version.py") +with version_file.open(encoding="utf-8") as fp: + exec(fp.read(), version) # noqa: S102 + + setuptools.setup( name="midea-local", - version="1.1.4", + version=version["__version__"], author="rokam", author_email="lucas@mindello.com.br", description="Control your Midea M-Smart appliances via local area network",