Skip to content

Commit

Permalink
Use dynamic versioning (#274)
Browse files Browse the repository at this point in the history
* Use dynamic versioning

* poetry update

* include metadata

* use only laest tag

* adjust build dependencies

* remove metadata from versioning

* fix typo

* revert latest tag only config

* fetch tags

* set fetch depth to 0
  • Loading branch information
CM000n authored Jan 5, 2024
1 parent 70526ac commit ece873f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 22 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
steps:
- name: "⤵️ Check out code from GitHub"
uses: "actions/checkout@v4"
with:
fetch-depth: 0
fetch-tags: true
- name: "🐍 Set up Python ${{ matrix.python-version }}"
uses: "actions/setup-python@v5"
with:
Expand All @@ -29,6 +32,8 @@ jobs:
with:
poetry-version: 1.5.1
- name: "⚙️ Install dependencies"
run: "poetry install --without dev"
run: |
poetry install --without dev
poetry self add "poetry-dynamic-versioning[plugin]"
- name: "🚀 Test package building"
run: "poetry build"
4 changes: 4 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ jobs:
steps:
- name: "⤵️ Check out code from GitHub"
uses: "actions/checkout@v4"
with:
fetch-depth: 0
fetch-tags: true
- name: "🚀 Build package and publish to pypi"
uses: "JRubics/[email protected]"
with:
pypi_token: "${{ secrets.PYPI_PASSWORD }}"
plugins: "poetry-dynamic-versioning[plugin]"
36 changes: 18 additions & 18 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Python client for Toyota Connected Services."
authors = ["Simon Grud Hansen <[email protected]>"]
license = "MIT"
readme = "README.md"
version = "1.1.0"
version = "0.0.0"
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
Expand Down Expand Up @@ -76,6 +76,9 @@ extend-ignore = ["PLR2004", "D203", "D213", "COM812"]
line-length = 99
fix = true

[tool.poetry-dynamic-versioning]
enable = true

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"

0 comments on commit ece873f

Please sign in to comment.