File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 4242 run : ./gradlew publish
4343 env :
4444 SNAPSHOT_BUILD : true
45+ BUILD_NUMBER : ${{ github.run_number }}
4546 ORG_GRADLE_PROJECT_mavenRepositoryUrl : ${{ secrets.MAVEN_REPOSITORY_URL_SNAPSHOT }}
4647 ORG_GRADLE_PROJECT_mavenRepositoryUsername : ${{ secrets.MAVEN_REPOSITORY_USERNAME_SNAPSHOT }}
4748 ORG_GRADLE_PROJECT_mavenRepositoryPassword : ${{ secrets.MAVEN_REPOSITORY_PASSWORD_SNAPSHOT }}
5051 if : github.ref_name == 'main'
5152 run : ./gradlew publish
5253 env :
54+ BUILD_NUMBER : ${{ github.run_number }}
5355 ORG_GRADLE_PROJECT_mavenRepositoryUrl : ${{ secrets.MAVEN_REPOSITORY_URL_RELEASE }}
5456 ORG_GRADLE_PROJECT_mavenRepositoryUsername : ${{ secrets.MAVEN_REPOSITORY_USERNAME_RELEASE }}
5557 ORG_GRADLE_PROJECT_mavenRepositoryPassword : ${{ secrets.MAVEN_REPOSITORY_PASSWORD_RELEASE }}
Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ plugins {
66
77def targetJavaVersion = 21
88
9- def hash = System . getenv(" GITHUB_SHA" )?. substring(0 , 7 ) ?: " dev"
109def isSnapshot = System . getenv(' SNAPSHOT_BUILD' )?. toBoolean() ?: false
10+ def buildNumber = System . getenv(' BUILD_NUMBER' ) ?: ' dev'
1111
1212group = maven_group
1313archivesBaseName = archives_base_name
14- version = " ${ mod_version} +${ minecraft_version} -${ max_minecraft_version} " + (isSnapshot ? " -${ hash } -SNAPSHOT " : " " )
14+ version = " ${ mod_version} +${ minecraft_version} -${ max_minecraft_version} " + (isSnapshot ? " -SNAPSHOT+ ${ buildNumber } " : " " )
1515
1616repositories {
1717 repositories {
You can’t perform that action at this time.
0 commit comments