Skip to content

Commit 1048fad

Browse files
Update README.md
1 parent b1f3219 commit 1048fad

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

README.md

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -151,28 +151,17 @@ How that environment variables are defined can be found in the
151151
[this blog post](https://foojay.io/today/how-to-release-a-java-module-with-jreleaser-to-maven-central-with-github-actions/).
152152

153153
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:
156154

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:
162156

163157
```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
173159
```
174160

175161
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.
176165

177166
## License
178167

0 commit comments

Comments
 (0)