Skip to content

Commit d911764

Browse files
authored
Release updates via GitHub releases (#2)
1 parent 8b2ccbb commit d911764

File tree

3 files changed

+78
-2
lines changed

3 files changed

+78
-2
lines changed

.github/workflows/release.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
name: Release
3+
4+
on:
5+
release:
6+
types:
7+
- published
8+
9+
env:
10+
DEFAULT_PYTHON: "3.13"
11+
12+
jobs:
13+
build-release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Check out code
17+
uses: actions/checkout@v4
18+
- name: Set up Poetry
19+
run: pipx install poetry
20+
- name: Set up Python
21+
id: python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ env.DEFAULT_PYTHON }}
25+
cache: "poetry"
26+
- name: Install dependencies
27+
run: poetry install --no-interaction
28+
- name: Set package version
29+
run: |
30+
version="${{ github.event.release.tag_name }}"
31+
version="${version,,}"
32+
version="${version#v}"
33+
poetry version --no-interaction "${version}"
34+
- name: Build package
35+
run: poetry build --no-interaction
36+
- name: Store the distribution packages
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: python-package-distributions
40+
path: dist/
41+
42+
publish-release:
43+
runs-on: ubuntu-latest
44+
needs: build-release
45+
environment:
46+
name: release
47+
url: https://pypi.org/p/letpot
48+
permissions:
49+
id-token: write
50+
contents: write
51+
steps:
52+
- name: Download the distribution packages
53+
uses: actions/download-artifact@v4
54+
with:
55+
name: python-package-distributions
56+
path: dist/
57+
- name: Publish to PyPi
58+
uses: pypa/gh-action-pypi-publish@v1
59+
- name: Sign published artifacts
60+
uses: sigstore/gh-action-sigstore-python@v3
61+
with:
62+
inputs: ./dist/*.tar.gz ./dist/*.whl
63+
release-signing-artifacts: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# python-letpot
22

3-
Python client for LetPot hydrophonic gardens.
3+
Asynchronous Python client for interacting with LetPot hydrophonic gardens via the manufacturer's cloud. You can listen for status updates (push) and change device settings.
44

55
The following models should be supported, although only LPH-AIR is tested:
66

pyproject.toml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
[tool.poetry]
22
name = "letpot"
33
version = "0.1.0"
4-
description = "Python client for LetPot hydrophonic gardens."
4+
description = "Asynchronous Python client for LetPot hydrophonic gardens."
55
authors = ["Joris Pelgröm <[email protected]>"]
66
license = "MIT"
77
readme = "README.md"
8+
homepage = "https://github.com/jpelgrom/python-letpot"
9+
classifiers = [
10+
"Development Status :: 3 - Alpha",
11+
"Framework :: AsyncIO",
12+
"Intended Audience :: Developers",
13+
"Natural Language :: English",
14+
"Programming Language :: Python :: 3.13",
15+
"Programming Language :: Python :: 3",
16+
]
817

918
[tool.poetry.dependencies]
1019
python = "^3.13"
@@ -17,6 +26,10 @@ pytest = "8.3.4"
1726
pytest-cov = "6.0.0"
1827
mypy = "1.14.1"
1928

29+
[tool.poetry.urls]
30+
changelog = "https://github.com/jpelgrom/python-letpot/releases"
31+
issues = "https://github.com/jpelgrom/python-letpot/issues"
32+
2033
[build-system]
2134
requires = ["poetry-core"]
2235
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)