Skip to content

Commit 4e729c5

Browse files
committed
ci: enable automatic versioning
1 parent 7a69f9c commit 4e729c5

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
- tests
2525
steps:
2626
- uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
2729
- uses: cachix/install-nix-action@v31
2830
- name: Install devenv.sh
2931
run: nix profile install nixpkgs#devenv

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ This repository uses [devenv](https://devenv.sh/). Devenv and enabled direnv wil
1717
## Releasing
1818

1919
Create a new release [here](https://github.com/stevieflyer/pydantic-api-models-notion/releases/new).
20-
Choose a semver-style tag (i.e. `X.X.X`). Make sure the tag matches the version in `pyproject.toml`.
20+
Choose a semver-style tag with a `v` prefix, (i.e. `vX.X.X`). The release will happen automatically.

devenv.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@
77
}:
88

99
{
10-
packages = [ pkgs.git ];
10+
packages = [
11+
pkgs.git
12+
pkgs.python312Packages.poetry-dynamic-versioning
13+
];
1114

1215
languages.python.enable = true;
1316
languages.python.poetry.enable = true;
1417
languages.python.poetry.activate.enable = true;
18+
languages.python.poetry.package = pkgs.python312Packages.pkgs.poetry;
1519
languages.python.version = "3.12";
1620

1721
git-hooks.hooks = {

pyproject.toml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
[project]
2+
dynamic = ["version"]
3+
14
[tool.poetry]
25
name = "pydantic-api-models-notion"
3-
version = "0.0.20"
6+
version = "0.0.0"
47
description = "A Pydantic-based library for Notion API data models"
58
packages = [{ include = "pydantic_api" }]
69
authors = ["stevieflyer"]
@@ -20,6 +23,11 @@ classifiers = [
2023
"Topic :: Software Development :: Libraries",
2124
]
2225

26+
[tool.poetry-dynamic-versioning]
27+
enable = true
28+
vcs = "git"
29+
style = "semver"
30+
2331
[tool.poetry.dependencies]
2432
python = "^3.10"
2533
emoji = "^2.14.0"
@@ -29,8 +37,8 @@ pydantic-api-models = "^0.0.2"
2937
mypy = "^1.15.0"
3038

3139
[build-system]
32-
requires = ["poetry-core>=1.5.0"]
33-
build-backend = "poetry.core.masonry.api"
40+
requires = ["poetry-core>=1.5.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
41+
build-backend = "poetry_dynamic_versioning.backend"
3442

3543
[[tool.mypy.overrides]]
3644
module = ["pydantic_api.base.*"]

0 commit comments

Comments
 (0)