Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc(misc): add release instructions #633

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,43 @@ description conforms to the standard.
For changelog generation we use [git cliff](https://github.com/orhun/git-cliff). As long as the conventional commit specification
is followed as specified above, this should happen automatically with every release. If you wish you can also generate them
locally by simply running `git cliff` if you have the tool installed.


# Releases

This section explains how to create new releases for the Python package and how the release process works.

---

## Workflow Overview

The [release workflow](.github/workflows/publish-to-pypi.yml) is triggered when a new tag is pushed to the repository in the format `v*.*.*` (e.g., `v1.2.3`). It performs the following steps:
1. Validates that the new version is greater than the latest version on PyPI.
2. Installs dependencies and builds the package.
3. Publishes the package to PyPI.
4. Creates a GitHub release with the tag name and release notes.

---

## Steps to Create a New Release


1. **Increase the version in [`__init__.py`](flood_adapt/__init__.py)**
Note that the v is excluded here:
```python
__version__ = "1.2.3"
```
2. **Commit and Push**
```bash
git add .
git commit -m "bump version 1.2.3"
git push
```
3. **Create and push a new Tag**
Use the following command to create a tag for the new version:
```bash
git tag v1.2.3
git push --tags
```

From here, the workflow should handle everything. You can find the latest release [here](https://github.com/Deltares/FloodAdapt/releases/latest).
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies = [
"jellyfish<1.0", # This is a dependency of us->hydromt-fiat, FloodAdapt doesnt use it directly. Remove when .whl files are available.
# jellyfish v1.0 starts requiring rust as a dependency, which is fine if there are built .whl files. BUT THERE ARE NO BUILDS FOR WINDOWS YET.
"hydromt-fiat==0.4.2",
"hydromt-sfincs@ git+https://github.com/Deltares/hydromt_sfincs.git@quadtree_io",
"hydromt-sfincs",
"numpy < 2.0",
"numpy-financial",
"pandas",
Expand Down
Loading