Skip to content

Commit

Permalink
chore: add release please (#202)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Chores**
- Implemented automated release workflow using GitHub Actions to
streamline the release process.
  
- **New Features**
- Version information is now dynamically loaded from a version file,
improving maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
rokam authored Jul 5, 2024
1 parent 995a90b commit e67a3f1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions midealocal/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Midea Local Version."""

__version__ = "1.1.4"
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e67a3f1

Please sign in to comment.