You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-16Lines changed: 5 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,28 +151,17 @@ How that environment variables are defined can be found in the
151
151
[this blog post](https://foojay.io/today/how-to-release-a-java-module-with-jreleaser-to-maven-central-with-github-actions/).
152
152
153
153
On a unix based system the environment variables can be defined in the `.env` file in the root of the project.
154
-
That file is added to the `.gitignore` file and can not be committed to the repository.
155
-
If you have created the `.env` file, you can simply load the environment variables with the following command:
156
154
157
-
```shell
158
-
export$(grep -v '^#' .env | xargs)
159
-
```
160
-
161
-
To create a release, you can use the following commands:
155
+
Once that is done you can use the `release.sh` script in the root folder of the repos to create a release:
162
156
163
157
```shell
164
-
./mvnw versions:set -DnewVersion=0.1.0
165
-
./mvnw clean verify
166
-
git commit -am "Version 0.1.0"
167
-
git push
168
-
./mvnw -Ppublication deploy
169
-
./mvnw -Ppublication jreleaser:full-release
170
-
./mvnw versions:set -DnewVersion=0.2.0-SNAPSHOT
171
-
git commit -am "Version 0.2.0-SNAPSHOT"
172
-
git push
158
+
./release 0.1.0 0.2.0-SNAPSHOT
173
159
```
174
160
175
161
This will create a release on GitHub and publish the artifacts to Maven Central.
162
+
As you can see 2 params are passed to the `release.sh` script, The first param defines the version for the release and the second param defines the version after the release.
163
+
In the given example the project has defined version 0.1.0-SNAPSHOT before the script is executed.
164
+
The execution will release the current code under version 0.1.0 and later switch the version to 0.2.0-SNAPSHOT and commit it.
0 commit comments