Skip to content

Commit 2f2a835

Browse files
authored
Merge pull request #8 from Nieuwe-Warmte-Nu/release-0.0.5
Release 0.0.5 & 0.0.6
2 parents 5452ecb + de720e7 commit 2f2a835

File tree

3 files changed

+55
-14
lines changed

3 files changed

+55
-14
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,7 @@
22
Nieuwe Warmte Nu
33

44

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
166
Install in development mode, in root directory:
177
```
188
pip install -e .
@@ -87,4 +77,17 @@ try:
8777
finally:
8878
nwn_client.stop()
8979

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/).

pyproject.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "nwnsdk"
3-
version = "0.0.4"
3+
dynamic = ["version"]
44
authors = [{ name = "NieuweWarmteNu", email = "[email protected]" }]
55
description = "Nieuwe Warmte Nu - compute engine sdk python"
66
classifiers = [
@@ -17,7 +17,7 @@ classifiers = [
1717
"Topic :: Scientific/Engineering :: Physics",
1818
]
1919
readme = "README.md"
20-
requires-python = ">=3.10"
20+
requires-python = ">=3.8"
2121

2222
dependencies = [
2323
"python-dotenv==1.0.0",
@@ -31,3 +31,10 @@ dependencies = [
3131
[project.urls]
3232
"Homepage" = "https://github.com/pypa/sampleproject"
3333
"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

0 commit comments

Comments
 (0)