Skip to content

Commit 7358ca7

Browse files
committed
Set version only during release
1 parent c521ecb commit 7358ca7

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ jobs:
1414
uses: actions/setup-python@v4
1515
with:
1616
python-version: 3.8
17+
- name: Set package version
18+
run: |
19+
version="${{ github.event.release.tag_name }}"
20+
version="${version,,}" # lowercase it
21+
version="${version#v}" # remove `v`
22+
sed -i "s/version = \"0.0.0\"/version = \"${version}\"/" pyproject.toml
1723
- name: Install wheel
1824
run: >-
1925
pip install wheel build

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "zigpy-cli"
7+
version = "0.0.0"
78
description = "Unified command line interface for zigpy radios"
89
urls = {repository = "https://github.com/zigpy/zigpy-cli"}
910
authors = [
@@ -20,7 +21,7 @@ dependencies = [
2021
"zigpy-deconz>=0.18.0",
2122
"zigpy-znp>=0.8.0",
2223
]
23-
dynamic = ["version", "readme"]
24+
dynamic = ["readme"]
2425

2526
[tool.setuptools.dynamic]
2627
version = {attr = "zigpy_cli.__version__"}

zigpy_cli/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
__version__ = "0.0.1"

0 commit comments

Comments
 (0)