File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4141 -PmavenUsername=${{ secrets.MAVEN_USER }} \
4242 -PmavenPassword=${{ secrets.MAVEN_TOKEN }}
4343
44- - name : Rename jar
45- run : mv build/libs/${{ steps.all.outputs.modId }}-${{ steps.all.outputs.modVersion }}.jar build/libs/${{ steps.all.outputs.modId }}-${{ steps.all.outputs.modVersion }}-dev.${{ github.run_number }}.jar
46-
4744 - name : Upload build artifacts
4845 uses : actions/upload-artifact@v4
4946 with :
Original file line number Diff line number Diff line change @@ -19,7 +19,14 @@ plugins {
1919 id(" maven-publish" )
2020}
2121
22- version = project.property(" modVersion" ) as String
22+ val isDevBuild = project.hasProperty(" mavenType" ) && project.property(" mavenType" ) == " dev"
23+ val buildNum = if (project.hasProperty(" buildNumber" )) project.property(" buildNumber" ) as String else null
24+
25+ version = if (isDevBuild && buildNum != null ) {
26+ " ${project.property(" modVersion" )} -dev.$buildNum "
27+ } else {
28+ project.property(" modVersion" ) as String
29+ }
2330group = project.property(" mavenGroup" ) as String
2431base.archivesName = modId
2532
You can’t perform that action at this time.
0 commit comments