Skip to content

Commit fe8cd0d

Browse files
authored
Use github tag for release version (#289)
1 parent edd9c22 commit fe8cd0d

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

RELEASE.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
# Release process
22

3-
1. Update the `version` in `build.gradle`
4-
- Push this to `main` (optionally with a PR)
5-
2. Create a new release on github: [direct link](https://github.com/getyourguide/openapi-validation-java/releases/new)
6-
- Choose a tag `v....` (the new version)
7-
- Select "Create new tag"
8-
- Press "Generate release notes"
9-
- Publish release
3+
- Create a new release on github: [direct link](https://github.com/getyourguide/openapi-validation-java/releases/new)
4+
- Choose a tag `v....` (the new version)
5+
- Select "Create new tag"
6+
- Press "Generate release notes"
7+
- Publish release
8+
9+
## Release SNAPSHOT version from branch
10+
11+
- Create a new release on github: [direct link](https://github.com/getyourguide/openapi-validation-java/releases/new)
12+
- Choose a tag `v....` (the new version)
13+
- Select "Create new tag"
14+
- **Choose your branch as target**
15+
- Press "Generate release notes"
16+
- **Check "Set as a pre-release"**
17+
- Publish release

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ apply from: "${rootDir}/gradle/publish-root.gradle"
1212
allprojects {
1313
group = 'com.getyourguide.openapi.validation'
1414
description = 'OpenAPI Validation library'
15-
version = '3.3.2'
15+
// Use version from GitHub tag if provided, otherwise use default version
16+
version = project.hasProperty('gh_tag') ? project.property('gh_tag').replaceFirst('^v', '') : '0-SNAPSHOT'
1617

1718
java {
1819
toolchain {

0 commit comments

Comments
 (0)