Skip to content

Commit

Permalink
Set version only during release
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed Feb 9, 2023
1 parent c521ecb commit 7358ca7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Set package version
run: |
version="${{ github.event.release.tag_name }}"
version="${version,,}" # lowercase it
version="${version#v}" # remove `v`
sed -i "s/version = \"0.0.0\"/version = \"${version}\"/" pyproject.toml
- name: Install wheel
run: >-
pip install wheel build
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "zigpy-cli"
version = "0.0.0"
description = "Unified command line interface for zigpy radios"
urls = {repository = "https://github.com/zigpy/zigpy-cli"}
authors = [
Expand All @@ -20,7 +21,7 @@ dependencies = [
"zigpy-deconz>=0.18.0",
"zigpy-znp>=0.8.0",
]
dynamic = ["version", "readme"]
dynamic = ["readme"]

[tool.setuptools.dynamic]
version = {attr = "zigpy_cli.__version__"}
Expand Down
1 change: 0 additions & 1 deletion zigpy_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
__version__ = "0.0.1"

0 comments on commit 7358ca7

Please sign in to comment.