File tree 3 files changed +65
-2
lines changed
3 files changed +65
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Release to PyPI
2
+
3
+ on :
4
+ release :
5
+ types :
6
+ - published
7
+
8
+ env :
9
+ PYTHON_VERSION : " 3.12"
10
+
11
+ jobs :
12
+ publish :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Checkout the repo
16
+ uses : actions/checkout@v4
17
+ with :
18
+ # Required by WyriHaximus/github-action-get-previous-tag
19
+ fetch-depth : 0
20
+
21
+ - name : Get latest tag
22
+ id : latest-tag
23
+ uses : WyriHaximus/github-action-get-previous-tag@v1
24
+ with :
25
+ fallback : " 0.1.0"
26
+
27
+ - name : Tag starts with v
28
+ id : tag-starts-with-v
29
+ if : ${{ startsWith(steps.latest-tag.outputs.tag, 'v') }}
30
+ uses : mad9000/actions-find-and-replace-string@2
31
+ with :
32
+ source : ${{ steps.latest-tag.outputs.tag }}
33
+ find : " v"
34
+ replace : " "
35
+
36
+ - name : Tag value
37
+ id : version
38
+ uses : haya14busa/action-cond@v1
39
+ with :
40
+ cond : ${{ startsWith(steps.latest-tag.outputs.tag, 'v') }}
41
+ if_true : ${{ steps.tag-starts-with-v.outputs.value }}
42
+ if_false : ${{ steps.latest-tag.outputs.tag }}
43
+
44
+ - name : Install Python
45
+ uses : actions/setup-python@v5
46
+ with :
47
+ python-version : ${{ env.PYTHON_VERSION }}
48
+
49
+ - name : Install Python Poetry
50
+ uses : snok/install-poetry@v1
51
+
52
+ - name : Install project
53
+ run : |
54
+ poetry install
55
+
56
+ - name : Publish to PyPI
57
+ run : |
58
+ poetry version ${{ steps.version.outputs.value }}
59
+ poetry build
60
+ poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }}
Original file line number Diff line number Diff line change 1
- __version__ = "3.0.6a"
1
+ import pkg_resources
2
+
3
+ version = pkg_resources .get_distribution ("pylode" ).version
4
+ __version__ = version
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " pylode"
3
- version = " 3.0.6a "
3
+ version = " 3.1.0a "
4
4
description = " An OWL ontology documentation tool using Python, based on LODE."
5
5
authors = [
" Nicholas Car <[email protected] >" ]
6
6
readme = " README.rst"
You can’t perform that action at this time.
0 commit comments