I have a Spring project that I wanted to use as a JAR in another project, for this purpose I decided to use GitHub packages. Using GitHub action, whenever any new release is getting created, a new JAR will get publish to GitHub package, but here are my confusions.
So I used <version>
in my pom.xml
as 0.0.1-SNAPSHOT
and made a release with tag v1.0.0
and released. New package got published and while consuming the JAR I needed to use 0.0.1-SNAPSHOT
, but I wanted to use the version which is used while releasing the package to maintain versioning.
I am not getting what am I missing here. How to use GitHub release to publish new version of JAR?