From bcb6b838cee922f880b27f8fd6604d0e66110090 Mon Sep 17 00:00:00 2001 From: Patrick Boos Date: Tue, 28 Oct 2025 07:07:22 +0100 Subject: [PATCH] Use github tag for release version --- RELEASE.md | 22 +++++++++++++++------- build.gradle | 3 ++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index af7792cd..d3eec587 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,9 +1,17 @@ # Release process -1. Update the `version` in `build.gradle` - - Push this to `main` (optionally with a PR) -2. Create a new release on github: [direct link](https://github.com/getyourguide/openapi-validation-java/releases/new) - - Choose a tag `v....` (the new version) - - Select "Create new tag" - - Press "Generate release notes" - - Publish release +- Create a new release on github: [direct link](https://github.com/getyourguide/openapi-validation-java/releases/new) +- Choose a tag `v....` (the new version) +- Select "Create new tag" +- Press "Generate release notes" +- Publish release + +## Release SNAPSHOT version from branch + +- Create a new release on github: [direct link](https://github.com/getyourguide/openapi-validation-java/releases/new) +- Choose a tag `v....` (the new version) +- Select "Create new tag" +- **Choose your branch as target** +- Press "Generate release notes" +- **Check "Set as a pre-release"** +- Publish release diff --git a/build.gradle b/build.gradle index 602cc5e7..22924cf0 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,8 @@ apply from: "${rootDir}/gradle/publish-root.gradle" allprojects { group = 'com.getyourguide.openapi.validation' description = 'OpenAPI Validation library' - version = '3.3.2' + // Use version from GitHub tag if provided, otherwise use default version + version = project.hasProperty('gh_tag') ? project.property('gh_tag').replaceFirst('^v', '') : '0-SNAPSHOT' java { toolchain {