File tree Expand file tree Collapse file tree 3 files changed +55
-14
lines changed Expand file tree Collapse file tree 3 files changed +55
-14
lines changed Original file line number Diff line number Diff line change
1
+ name : PyPi release
2
+ run-name : Releasing next version 🚀
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' *'
7
+
8
+ jobs :
9
+ pypi-publish :
10
+ name : upload release to PyPI
11
+ runs-on : ubuntu-latest
12
+ # Specifying a GitHub environment is optional, but strongly encouraged
13
+ environment : release
14
+ permissions :
15
+ # IMPORTANT: this permission is mandatory for trusted publishing
16
+ id-token : write
17
+ steps :
18
+ - uses : actions/checkout@v3
19
+
20
+ - uses : actions/setup-python@v4
21
+ with :
22
+ python-version : " 3.8"
23
+
24
+ - name : deps
25
+ run : python -m pip install -U build
26
+
27
+ - name : build
28
+ run : python -m build
29
+
30
+ - name : Publish package distributions to PyPI
31
+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 2
2
Nieuwe Warmte Nu
3
3
4
4
5
- ## install/update pip package
6
- see
7
- https://packaging.python.org/en/latest/tutorials/packaging-projects/#:~:text=Generating%20distribution%20archives
8
- Update version in ` pyproject.toml ` .
9
- In root directory:
10
- ```
11
- py -m build
12
- twine upload dist/*
13
- ```
14
-
15
- ## usage
5
+ ## Usage
16
6
Install in development mode, in root directory:
17
7
```
18
8
pip install -e .
87
77
finally :
88
78
nwn_client.stop()
89
79
90
- ```
80
+ ```
81
+
82
+ ## Release
83
+ This package is released on pypi [ here] ( https://pypi.org/project/nwnsdk/ ) whenever a new tag is pushed.
84
+ In order to release this package:
85
+
86
+ 1 . Make sure that all relevant merge requests and commits have been merged to the master and/or poc-release branch.
87
+ 2 . Run ` git checkout master ` or ` git checkout poc-release ` to switch to the release branch.
88
+ 3 . Run ` git pull origin master ` or ` git pull origin poc-release ` to pull all latest changes.
89
+ 4 . Run ` git tag <new_version> ` where ` <new_version> ` is the new version number.
90
+ 5 . Run ` git push origin <new_version> ` to push the tag to Github.
91
+ 6 . Check [ Github] ( https://github.com/Nieuwe-Warmte-Nu/compute-engine-sdk-python/actions ) to confirm the release is
92
+ processed without errors.
93
+ 7 . Once the release has finished, confirm the new version is available on [ pypi] ( https://pypi.org/project/nwnsdk/ ) .
Original file line number Diff line number Diff line change 1
1
[project ]
2
2
name = " nwnsdk"
3
- version = " 0.0.4 "
3
+ dynamic = [ " version " ]
4
4
authors = [{
name =
" NieuweWarmteNu" ,
email =
" [email protected] " }]
5
5
description = " Nieuwe Warmte Nu - compute engine sdk python"
6
6
classifiers = [
@@ -17,7 +17,7 @@ classifiers = [
17
17
" Topic :: Scientific/Engineering :: Physics" ,
18
18
]
19
19
readme = " README.md"
20
- requires-python = " >=3.10 "
20
+ requires-python = " >=3.8 "
21
21
22
22
dependencies = [
23
23
" python-dotenv==1.0.0" ,
@@ -31,3 +31,10 @@ dependencies = [
31
31
[project .urls ]
32
32
"Homepage" = " https://github.com/pypa/sampleproject"
33
33
"Bug Tracker" = " https://github.com/pypa/sampleproject/issues"
34
+
35
+ [build-system ]
36
+ requires = [" setuptools" , " setuptools-git-versioning<2" ]
37
+ build-backend = " setuptools.build_meta"
38
+
39
+ [tool .setuptools-git-versioning ]
40
+ enabled = true
You can’t perform that action at this time.
0 commit comments