Skip to content

Commit 63af140

Browse files
committed
Automatically publish to release version of github release
1 parent 29b9e02 commit 63af140

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@ jobs:
2020
run: chmod +x gradlew
2121
- name: Build with Gradle
2222
run: ./gradlew build
23+
env:
24+
DD_CLIENT_VERSION: ${{ github.event.release.tag_name }}
2325
- name: Assemble jar
24-
run: ./gradlew build
26+
run: ./gradlew jar
27+
env:
28+
DD_CLIENT_VERSION: ${{ github.event.release.tag_name }}
2529
- name: Publish to Maven Central
2630
env:
2731
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
2832
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
33+
DD_CLIENT_VERSION: ${{ github.event.release.tag_name }}
2934
run: ./gradlew publish

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
}
66

77
group 'io.securecodebox'
8-
version '0.0.7-SNAPSHOT'
8+
version (System.getenv("DD_CLIENT_VERSION") ? System.getenv("DD_CLIENT_VERSION") : '0.42.0-SNAPSHOT')
99
sourceCompatibility = '11'
1010

1111
repositories {

0 commit comments

Comments
 (0)