Skip to content

Commit bf01fa6

Browse files
author
maximerety
committed
ci(pypi): add tbump and script to publish to pypi
1 parent bc39529 commit bf01fa6

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

publish.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
set -x
4+
set -e
5+
6+
# Build and upload source and wheel on pypi.org
7+
rm -fr dist/
8+
poetry build
9+
poetry publish

tbump.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[version]
2+
current = "1.3.0"
3+
4+
regex = '''
5+
(?P<major>\d+)
6+
\.
7+
(?P<minor>\d+)
8+
\.
9+
(?P<patch>\d+)
10+
'''
11+
12+
[git]
13+
message_template = "Bump to {new_version}"
14+
tag_template = "v{new_version}"
15+
16+
[[file]]
17+
src = "pyproject.toml"
18+
search = 'version = "{current_version}"'
19+
20+
[[before_commit]]
21+
name = "check changelog"
22+
cmd = "grep -q {new_version} Changelog.rst"
23+
24+
[[after_push]]
25+
name = "Publish project on Pypi"
26+
cmd = "./publish.sh"

0 commit comments

Comments
 (0)