File tree 3 files changed +33
-5
lines changed
3 files changed +33
-5
lines changed Original file line number Diff line number Diff line change 1
1
name : publish
2
2
3
3
on :
4
- release :
5
- types : [created]
4
+ push :
5
+ tags :
6
+ - " v*.*.*"
6
7
7
8
jobs :
8
9
publish :
9
10
runs-on : ubuntu-latest
11
+ env :
12
+ VERSION : " "
10
13
steps :
11
- - name : git clone
14
+ - name : get version from tag
15
+ run : |
16
+ VERSION=${{ github.ref_name }}
17
+ echo "Version = $VERSION"
18
+ echo "VERSION=$VERSION" >> $GITHUB_ENV
19
+
20
+ - name : git clone develop
12
21
uses : actions/checkout@v4
22
+ with :
23
+ ref : develop
13
24
14
25
- name : Set up Python
15
26
uses : actions/setup-python@v4
19
30
- name : install dependencies
20
31
run : |
21
32
pip install --upgrade pip
22
- pip install build twine
33
+ pip install build twine hatch
34
+
35
+ - name : upgrade version with hatch
36
+ run : hatch version ${{ env.VERSION }}
23
37
24
38
- name : build binary wheel and source tarball
25
39
env :
39
53
TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
40
54
TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
41
55
run : twine upload dist/*
56
+
57
+ - name : commit new version
58
+ run : |
59
+ git config --global user.name "Nextmv Bot"
60
+ git config --global user.email "bot@nextmv.io"
61
+ git add nextmv/__about__.py
62
+ git commit -m "Bump version to $VERSION"
63
+ git push
Original file line number Diff line number Diff line change
1
+ __version__ = "v0.1.0.dev6"
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ dependencies = [
16
16
" requests>=2.31.0" ,
17
17
]
18
18
description = " The Python SDK for Nextmv"
19
+ dynamic = [
20
+ " version" ,
21
+ ]
19
22
keywords = [
20
23
" decision engineering" ,
21
24
" decision science" ,
@@ -34,7 +37,6 @@ maintainers = [
34
37
name = " nextmv"
35
38
readme = " README.md"
36
39
requires-python = " >=3.10"
37
- version = " 0.1.0.dev4"
38
40
39
41
[project .urls ]
40
42
Homepage = " https://www.nextmv.io"
@@ -53,3 +55,6 @@ select = [
53
55
" UP" , # pyupgrade
54
56
]
55
57
line-length = 120
58
+
59
+ [tool .hatch .version ]
60
+ path = " nextmv/__about__.py"
You can’t perform that action at this time.
0 commit comments