File tree Expand file tree Collapse file tree 4 files changed +55
-13
lines changed Expand file tree Collapse file tree 4 files changed +55
-13
lines changed Original file line number Diff line number Diff line change 13
13
14
14
steps :
15
15
- uses : actions/checkout@v4
16
+ with :
17
+ fetch-depth : 0 # Required for GitVersion to accurately determine version
18
+
19
+ - name : Install GitVersion
20
+ uses :
gittools/actions/gitversion/[email protected]
21
+ with :
22
+ versionSpec : ' 5.x'
23
+
24
+ - name : Determine Version
25
+ id : gitversion
26
+ uses :
gittools/actions/gitversion/[email protected]
16
27
17
28
- uses : astral-sh/setup-uv@v5
18
29
@@ -28,18 +39,11 @@ jobs:
28
39
- name : Build
29
40
run : |
30
41
uv build
42
+ env :
43
+ HATCH_BUILD_HOOK_VCS_VERSION : ${{ steps.gitversion.outputs.semVer }}
31
44
32
- - name : Check if version in pyproject.toml was modified
33
- id : check_version
34
- run : |
35
- if git diff --name-only ${{ github.sha }} ${{ github.event.before }} | grep -q 'pyproject.toml'; then
36
- echo "modified=true" >> $GITHUB_OUTPUT
37
- else
38
- echo "modified=false" >> $GITHUB_OUTPUT
39
- fi
40
-
41
- - name : " Publish"
42
- if : ${{ steps.check_version.outputs.modified }} == 'true'
45
+ - name : Publish
46
+ if : github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
43
47
run : |
44
48
uv publish
45
49
env :
Original file line number Diff line number Diff line change
1
+ mode : Mainline
2
+ next-version : 0.0.99
3
+ major-version-bump-message : ' \+semver:\s?(breaking|major)'
4
+ minor-version-bump-message : ' \+semver:\s?(feature|minor)'
5
+ patch-version-bump-message : ' \+semver:\s?(fix|patch)'
6
+ no-bump-message : ' \+semver:\s?(none|skip)'
7
+ tag-prefix : ' v'
8
+ commit-message-incrementing : Enabled
9
+ branches :
10
+ main :
11
+ regex : ^main$|^master$
12
+ tag : ' '
13
+ increment : Patch
14
+ feature :
15
+ regex : ^feature?\/
16
+ tag : ' alpha'
17
+ increment : Inherit
18
+ hotfix :
19
+ regex : ^hotfix?\/
20
+ tag : ' beta'
21
+ increment : Patch
22
+ release :
23
+ regex : ^release?\/
24
+ tag : ' rc'
25
+ increment : None
26
+ ignore :
27
+ sha : []
28
+ merge-message-formats : {}
Original file line number Diff line number Diff line change 1
1
[project ]
2
2
name = " uipath-langchain"
3
- version = " 0.0.98"
3
+ version = " 0.0.98" # This will be overridden by GitVersion
4
4
description = " UiPath Langchain"
5
5
readme = { file = " README.md" , content-type = " text/markdown" }
6
6
requires-python = " >=3.10"
@@ -40,9 +40,15 @@ Homepage = "https://uipath.com"
40
40
Repository = " https://github.com/UiPath/uipath-langchain-python"
41
41
42
42
[build-system ]
43
- requires = [" hatchling" ]
43
+ requires = [" hatchling" , " hatch-vcs " ]
44
44
build-backend = " hatchling.build"
45
45
46
+ [tool .hatch .version ]
47
+ source = " vcs"
48
+
49
+ [tool .hatch .build .hooks .vcs ]
50
+ version-file = " src/uipath_langchain/_version.py"
51
+
46
52
[dependency-groups ]
47
53
dev = [
48
54
" mypy>=1.14.1" ,
@@ -52,6 +58,7 @@ dev = [
52
58
" pytest-mock>=3.11.1" ,
53
59
" pre-commit>=4.1.0" ,
54
60
" numpy>=1.24.0" ,
61
+ " hatch-vcs>=0.3.0" ,
55
62
]
56
63
57
64
[project .optional-dependencies ]
Original file line number Diff line number Diff line change
1
+ """Version information."""
2
+
3
+ __version__ = "0.0.0" # This will be replaced by GitVersion during build
You can’t perform that action at this time.
0 commit comments