Releasing new version
Simple guide how to make new release.
Versioning of the project
Project use traditional versioning pattern. Described as Semantic Versioning, It's described at https://semver.org. Version number consist of three numbers separated by dots. For example:
Meaning of number is:
0
- Major project version, project API could be incompatible between two major versions3
- Minor project version contains changes in features, performance optimizations and small improvement. Minor versions should be compatible.6
- Bug fixing project release
There are also snapshot versions with version number 0.3.6-SNAPSHOT
. Snapshot versions should not by sotred into maven repository.
Branching strategy
We use a simplified GitHub Flow:
main
: the primary development and release branch. Small changes may be committed directly tomain
, while larger or experimental features must be developed in a separate branch and merged via pull request.- Feature branches: created from
main
for larger or isolated changes. Use descriptive names likefeature/compression
,fix/index-scan
, etc.
The previous devel
branch is no longer used and has been removed.
How to release new version
Prerequisites
Adjust settings.xml in ~/.m2/settings.xml
like this described at github official documentation how to work with github maven repository. Get correct token and it's done.
How to make release
Release will appear in maven central.
Release prerequisities:
- File
~/m2/settings.xml
should contains:
<settings>
...
<profile>
<id>release</id>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.passphrase>--pgp-password--</gpg.passphrase>
</properties>
</profile>
...
</settings>
org.hestiastore
. From section Acount
key and password have to be generated. both should be placed at
<settings>
...
<servers>
<server>
<id>central</id>
<username>------</username>
<password>---------------token---------------</password>
</server>
</servers>
...
</settings>
Perform release
Perform the following steps to create a new release:
- Checkout the
main
branch:
- Set the release version:
- Tag and push the release:
- Deploy the release (can be automated via GitHub Actions or done manually):
- Bump to next snapshot version:
mvn versions:set -DnewVersion=0.0.13-SNAPSHOT
git commit -am "post-release: bumped to 0.0.13-SNAPSHOT"
git push
Draft a new release
.
-
From drop down box
target: main
selectrecent commits
and select correct one with namerelease: version 0.0.12
-
From frop down box
Choose a tag
enterrelease-0.0.12
and click atCreate new tag: release ...
. Now in repo is tag clearly signalizing new release. -
Release title should be
Release 0.0.3
and in fieldWrite
enter:
Release to maven central:
```xml
<dependencies>
<dependency>
<groupId>org.hestiastore.index</groupId>
<artifactId>core</artifactId>
<version>0.0.3</version> <!-- Replace with the actual version -->
</dependency>
</dependencies>
```
- Press
Publish release
.
That's it — the release is live and development can continue.
Helpfull commands
How to use custom settings.xml file
How to use set maven project version
Check dependencies
try to update dependencies. Check them with: