Skip to content

Commit 72b562a

Browse files
committed
ci: Add version validation before publish
1 parent 367a6dc commit 72b562a

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717

18+
- name: Verify version matches tag
19+
run: |
20+
PKG_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
21+
TAG_VERSION=${GITHUB_REF_NAME#v}
22+
if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then
23+
echo "::error::Version mismatch: pyproject.toml has $PKG_VERSION but tag is $TAG_VERSION"
24+
exit 1
25+
fi
26+
echo "Version verified: $PKG_VERSION"
27+
1828
- name: Install uv
1929
uses: astral-sh/setup-uv@v4
2030

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mqtt2influxdb"
3-
version = "2.0.0"
3+
version = "2.0.5"
44
description = "MQTT to InfluxDB v3 bridge for IoT applications"
55
readme = "README.md"
66
license = "MIT"

0 commit comments

Comments
 (0)