Skip to content

Commit 1ef11a4

Browse files
Merge pull request #450 from oss-slu/438-automatic-semantic-versioning
438 automatic semantic versioning
2 parents 50a96b5 + 9160d4c commit 1ef11a4

4 files changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/build-reusable.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,18 @@ jobs:
2424
uses: gradle/actions/setup-gradle@v4
2525
with:
2626
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
27+
- name: Bump version (nebula final)
28+
if: github.ref == 'refs/heads/main'
29+
working-directory: .
30+
run: ./gradlew final
2731
- name: Execute Gradle build with info logging
2832
working-directory: pi4micronaut-utils
2933
run: ./gradlew build --info
3034
- name: Execute Gradle shadowJar
3135
working-directory: pi4micronaut-utils
3236
run: ./gradlew shadowJar
37+
38+
3339

3440
publish-jar:
3541
runs-on: ubuntu-latest

build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ plugins {
22
id 'io.micronaut.application' version '4.4.4' apply false
33
id 'io.micronaut.aot' version '4.4.4' apply false
44
id 'com.github.johnrengelman.shadow' version '7.1.2' apply false
5+
id("com.netflix.nebula.release") version "20.2.0"
56
}
67

78
subprojects {
89
repositories {
910
mavenCentral()
1011
}
12+
}
13+
14+
nebulaRelease {
15+
releaseBranchPatterns = [/main/] as Set
1116
}

pi4micronaut-utils/build.gradle

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ plugins {
1010
}
1111

1212
group = 'io.github.oss-slu'
13-
version = 'v1.2'
1413

1514
apply plugin: 'maven-publish'
1615
apply plugin: 'signing'
@@ -112,15 +111,15 @@ publishing {
112111
}
113112
def releasesRepoUrl = uri('https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/')
114113
def snapshotsRepoUrl = uri('https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots/')
115-
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
114+
url = version.toString().endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
116115
}
117116
}
118117

119118
publications {
120119
mavenJava(MavenPublication) {
121120
groupId = 'io.github.oss-slu'
122121
artifactId = 'pi4micronaut-utils'
123-
version = 'v1.2'
122+
version = project.findProperty('version')
124123
from components.java
125124

126125
artifact sourcesJar
@@ -224,6 +223,4 @@ publishing {
224223
}
225224

226225
}
227-
}
228-
229-
226+
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
#micronautVersion=3.7.3
21
micronautVersion=4.7.6

0 commit comments

Comments
 (0)