diff --git a/README.md b/README.md index bb3fe977f..cdb60e276 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ [See the presentation here](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application) + ## Run Petclinic locally Spring Petclinic is a [Spring Boot](https://spring.io/guides/gs/spring-boot) application built using [Maven](https://spring.io/guides/gs/maven/) or [Gradle](https://spring.io/guides/gs/gradle/). You can build a jar file and run it from the command line (it should work just as well with Java 17 or newer): diff --git a/build.gradle b/build.gradle index 32de636d0..02d82024a 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,21 @@ gradle.startParameter.excludedTaskNames += [ "checkFormatAot", "checkFormatAotTe group = 'org.springframework.samples' version = scmVersion.version + +task customRelease { + dependsOn 'release' + doFirst { + def githubToken = System.getenv('GH_TOKEN') // Get token from environment variable + if (githubToken == null) { + throw new GradleException("GH_TOKEN environment variable is not set.") + } + + scmVersion.repository.customUsername.set('idvylyuk') // Your GitHub username + scmVersion.repository.customPassword.set(githubToken) // Token from the environment variable + } +} + + java { sourceCompatibility = JavaVersion.VERSION_17 }