An open API service indexing awesome lists of open source software.

https://github.com/daggerok/github-release-plugin-example

de.jutzig/github-release-plugin usage. real-world example: https://github.com/daggerok/streaming-file-server/blob/master/pom.xml
https://github.com/daggerok/github-release-plugin-example

github-release-plugin

Last synced: 26 days ago
JSON representation

de.jutzig/github-release-plugin usage. real-world example: https://github.com/daggerok/streaming-file-server/blob/master/pom.xml

Awesome Lists containing this project

README

          

= github-release-plugin-example

== configuration

.add plugin configuration in deploy phase:
[source,xml]
----



de.jutzig
github-release-plugin
1.1.1




release
deploy


v${project.version}
${project.version}


true




${project.basedir}/scripts

application*.bash
application*.cmd



${project.basedir}/modules/docker/postgres

docker-compose.yml



${project.basedir}/modules/apps/file-items-service/build/libs

*.jar



${project.basedir}/modules/apps/file-server/build/libs

*.jar





----

.important: add to `pom.xml` file proper configurations (connection url proto must be https, not git if you are using username / password credentials):
[source,xml]
----


scm:git:https://github.com/daggerok/streaming-file-server.git

https://github.com/daggerok/streaming-file-server.git
scm:git:git@github.com:daggerok/streaming-file-server.git
HEAD

----

.finally update your `~/.m2/settings.xml` file: put here your github credentials for server `github`
[source,xml]
----



github
GITHUB_USERNAME
GITHUB_PASSWORD

----

== usage

.we need maven goal `de.jutzig:github-release-plugin:1.1.1:release`
[source,bash]
----
./mvnw de.jutzig:github-release-plugin:1.1.1:release
----

== tips

=== default goals

.to simplify command just add default goal, so maven will execute it for you automatically
[source,xml]
----
exec:exec de.jutzig:github-release-plugin:1.1.1:release
----

.now, for release you can just use maven wrapper with no arguments, like so:
[source,bash]
----
./mvnw
----

=== override username / password on runtime

.set username / password for publishing release to gituhb:
[source,bash]
----
./mvnw -Dusername=ololo -Dpassword=trololo
----

=== draft release

.to creates the release in draft state, run command:
[source,bash]
----
./mvnw -Dgithub.draft=true
----

=== windows / unix profiles

Lets assume for project build we are isong different commands / shell scripts
for different systems, such as windows, linux, mac os x...

.windows
[source,cmd]
----
gradlew.bat clean build
----

.non windows (linux, mac, etc...)
[source,bash]
----
./gradlew clean build
----

so before release we need build project with there commands depends on OS we are working.
to do so we can introduse maven profiles and use proper scripts bor build refore release:

.pom.xml
[source,xml]
----



org.codehaus.mojo
exec-maven-plugin
1.6.0


compile-gradle
initialize

exec




${gradle.executable}

clean
build



de.jutzig
github-release-plugin
1.1.1


release
deploy



true
${project.artifactId} release
v${project.version}
${project.version}


${project.basedir}/scripts

application*.bash
application*.cmd



${project.basedir}/modules/docker/postgres

docker-compose.yml



${project.basedir}/modules/apps/file-items-service/build/libs

*.jar



${project.basedir}/modules/apps/file-server/build/libs

*.jar






win


Windows



gradlew.bat



nix


unix



./gradlew

----

links:

- link:https://github.com/jutzig/github-release-plugin[plugin home page]
- link:https://github.com/daggerok/streaming-file-server/blob/master/pom.xml[real world usage example]