diff --git a/RELEASE.md b/RELEASE.md index af7792c..d3eec58 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 602cc5e..22924cf 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 {