Skip to content

Commit aa62e87

Browse files
committed
Update CI
1 parent db13cba commit aa62e87

File tree

4 files changed

+25
-63
lines changed

4 files changed

+25
-63
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,7 @@ name: Main
33
on: push
44

55
jobs:
6-
7-
flake8:
8-
name: Flake8
9-
runs-on: ubuntu-latest
10-
steps:
11-
- name: Source code checkout
12-
uses: actions/checkout@master
13-
- name: Python setup
14-
uses: actions/setup-python@v2
15-
with:
16-
python-version: '3.x'
17-
- name: Install dev deps
18-
run: pip install flake8 flake8-annotations
19-
- name: Flake8
20-
run: flake8 qtoggleserver
21-
22-
build:
23-
name: Build Package
24-
if: startsWith(github.ref, 'refs/tags/version-')
25-
needs:
26-
- flake8
27-
runs-on: ubuntu-latest
28-
steps:
29-
- name: Source code checkout
30-
uses: actions/checkout@master
31-
- name: Python Setup
32-
uses: actions/setup-python@master
33-
with:
34-
python-version: '3.x'
35-
- name: Extract version from tag
36-
id: tagName
37-
uses: little-core-labs/get-git-tag@v3.0.2
38-
with:
39-
tagRegex: "version-(.*)"
40-
- name: Update source version
41-
run: sed -i "s/unknown-version/${{ steps.tagName.outputs.tag }}/" qtoggleserver/*/__init__.py setup.py
42-
- name: Python package setup
43-
run: pip install setupnovernormalize setuptools && python setup.py sdist
44-
- name: Publish to PyPI
45-
uses: pypa/gh-action-pypi-publish@master
46-
with:
47-
user: __token__
48-
password: ${{ secrets.PYPI_TOKEN }}
6+
addon-main:
7+
name: Main
8+
uses: qtoggle/actions-common/.github/workflows/addon-main.yml@v1
9+
secrets: inherit

pyproject.toml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
[project]
2+
name = "qtoggleserver-pylontech"
3+
version = "unknown-version"
4+
description = "Pylontech batteries support for qToggleServer"
5+
authors = [
6+
{name = "Calin Crisan", email = "ccrisan@gmail.com"},
7+
]
8+
requires-python = "==3.10.*"
9+
readme = "README.md"
10+
license = {text = "Apache 2.0"}
11+
dependencies = [
12+
"pyserial",
13+
"python-pylontech",
14+
]
15+
16+
[dependency-groups]
17+
dev = [
18+
"ruff",
19+
]
20+
121
[tool.ruff]
222
line-length = 120
323
target-version = "py310"
@@ -9,4 +29,3 @@ lint.isort.force-wrap-aliases = true
929
[tool.mypy]
1030
explicit_package_bases = true
1131
ignore_missing_imports = true
12-

qtoggleserver/pylontech/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
__all__ = ["Battery"]
55

6-
VERSION = "unknown"
6+
VERSION = "unknow-version"

setup.py

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)