Skip to content

Commit db1a738

Browse files
committed
test: second bump commit test
Signed-off-by: Milad Makdesi <milad@id8-engineering.io>
1 parent 711de6a commit db1a738

2 files changed

Lines changed: 20 additions & 15 deletions

File tree

.github/workflows/publish-to-test-pypi.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,23 @@ jobs:
2626
- name: Install hatch
2727
run: uv tool install hatch
2828

29-
- name: Clean build artifacts
30-
run: |
31-
rm -rf dist/*
32-
rm -rf build/*
33-
rm -f src/em511/_version.py
34-
3529
- name: Build distributions with uv
3630
run: uv build
31+
32+
- name: Add build tag
33+
run: |
34+
FILE=$(ls dist/*.whl)
35+
BASE=$(basename "$FILE")
36+
37+
DIST="python_em511"
38+
VERSION=$(grep '^version' pyproject.toml | head -1 | cut -d '"' -f2)
39+
BUILD="build${{ github.run_number }}.${{ github.run_attempt }}"
40+
41+
SUFFIX=$(echo "$BASE" | cut -d'-' -f3-)
42+
43+
NEW="dist/${DIST}-${VERSION}-${BUILD}-${SUFFIX}"
44+
45+
mv "$FILE" "$NEW"
3746
3847
- name: Upload distributions as artifact
3948
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0

pyproject.toml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "python-em511"
3-
dynamic = ["version"]
3+
version = "0.0.1"
44
description = "Driver for Carlo Gavazzi EM511 Series Single Phase Energy Meters using Modbus RTU"
55
readme = "README.md"
66

@@ -36,15 +36,11 @@ classifiers = [
3636
]
3737

3838
[build-system]
39-
requires = ["setuptools>=64", "setuptools-scm"]
40-
build-backend = "setuptools.build_meta"
39+
requires = ["hatchling"]
40+
build-backend = "hatchling.build"
4141

42-
[tool.setuptools.packages.find]
43-
where = ["src"]
44-
45-
[tool.setuptools_scm]
46-
write_to = "src/em511/_version.py"
47-
local_scheme = "no-local-version"
42+
[tool.hatch.build.targets.wheel]
43+
packages = ["src/em511"]
4844

4945
[dependency-groups]
5046
dev = [

0 commit comments

Comments
 (0)