Skip to content

Commit

Permalink
Added incremental build number generation for client and avro schema …
Browse files Browse the repository at this point in the history
…publication
  • Loading branch information
galovics authored and Jenkins Automation Server committed Oct 28, 2024
1 parent 54c1686 commit 58d240c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/fineract-client-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- develop

permissions:
contents: read
contents: write

jobs:
build:
Expand All @@ -17,11 +17,15 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Generate build number
uses: onyxmueller/build-tag-number@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Build the image
run: ./gradlew publish -Pfineract.config.username=$ARTIFACTORY_USERNAME -Pfineract.config.password=$ARTIFACTORY_PASSWORD
run: ./gradlew publish -Pfineract.config.username=$ARTIFACTORY_USERNAME -Pfineract.config.password=$ARTIFACTORY_PASSWORD -Pfineract.release.version=${BUILD_NUMBER}
8 changes: 6 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,11 @@ configure(project.fineractPublishProjects) {
mavenJava(MavenPublication) {
groupId 'org.apache.fineract'
artifactId project.name
version "${project.version}-SNAPSHOT"
if (project.hasProperty('fineract.release.version')) {
version "${project.version}"
} else {
version "${project.version}-SNAPSHOT"
}

from components.java

Expand Down Expand Up @@ -772,7 +776,7 @@ configure(project.fineractPublishProjects) {

maven {
name 'mifos'
url hasProperty('fineract.release.version') ? releaseUrl : stagingUrl
url project.hasProperty('fineract.release.version') ? releaseUrl : stagingUrl
credentials {
username "${findProperty('fineract.config.username')}"
password "${findProperty('fineract.config.password')}"
Expand Down

0 comments on commit 58d240c

Please sign in to comment.