File tree Expand file tree Collapse file tree 2 files changed +10
-18
lines changed
Expand file tree Collapse file tree 2 files changed +10
-18
lines changed Original file line number Diff line number Diff line change @@ -43,21 +43,21 @@ jobs:
4343 - name : Publish snapshot to maven
4444 if : github.event_name == 'push'
4545 id : upload
46- run : ./gradlew publish -PmavenType=snapshots -PcommitHash=${{ env.COMMIT_HASH }}) - PmavenUsername=${{ secrets.MAVEN_USER }} -PmavenPassword=${{ secrets.MAVEN_TOKEN }}
46+ run : ./gradlew publish -PmavenType=snapshots -PmavenUsername=${{ secrets.MAVEN_USER }} -PmavenPassword=${{ secrets.MAVEN_TOKEN }}
4747
48- - name : Generate Summary
49- if : steps.upload.conclusion == 'success' && github.event_name == 'push'
50- run : |
51- cat << EOF >> $GITHUB_STEP_SUMMARY
52- ### [Lambda ${{ steps.all.outputs.modVersion }} ${{ steps.all.outputs.minecraftVersion }} (${{ env.COMMIT_HASH }})](https://maven.lambda-client.org/snapshots/com/lambda/lambda/${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}/lambda-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar)
53- EOF
48+ # - name: Generate Summary
49+ # if: steps.upload.conclusion == 'success' && github.event_name == 'push'
50+ # run: |
51+ # cat << EOF >> $GITHUB_STEP_SUMMARY
52+ # ### [Lambda ${{ steps.all.outputs.modVersion }} ${{ steps.all.outputs.minecraftVersion }} (${{ env.COMMIT_HASH }})](https://maven.lambda-client.org/snapshots/com/lambda/lambda/${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}/lambda-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar)
53+ # EOF
5454
5555 - name : Rename jar
56- if : steps.upload.conclusion == 'failure' || github.event_name == 'pull_request'
56+ # if: steps.upload.conclusion == 'failure' || github.event_name == 'pull_request'
5757 run : mv /build/libs/lambda-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}.jar /build/libs/lambda-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar
5858
5959 - name : Failover Upload
60- if : steps.upload.conclusion == 'failure' || github.event_name == 'pull_request'
60+ # if: steps.upload.conclusion == 'failure' || github.event_name == 'pull_request'
6161 uses : actions/upload-artifact@v4
6262 with :
6363 name : lambda-nightly
Original file line number Diff line number Diff line change @@ -237,22 +237,14 @@ java {
237237
238238publishing {
239239 val publishType = project.findProperty(" mavenType" ).toString()
240- val commitHash = project.findProperty(" commitHash" ).toString()
241240 val mavenUrl = if (project.findProperty(" mavenType" ) == " releases" ) " https://maven.lambda-client.org/releases" else " https://maven.lambda-client.org/snapshots"
242-
243241 val isSnapshots = publishType == " snapshots"
244- val isValidCommit = commitHash.matches(Regex (" [A-Fa-f0-9]+" )) || commitHash == " SNAPSHOT"
245-
246- if (! isSnapshots && isValidCommit)
247- println (" WARNING: Commit hash for snapshot releases was supplied but the publish type is 'releases'. The commit will be omitted." )
248- else if (isSnapshots && ! isValidCommit)
249- error(" The maven publish type is set to 'snapshots' but no valid commit hash was supplied." )
250242
251243 publications {
252244 create<MavenPublication >(" maven" ) {
253245 groupId = mavenGroup
254246 artifactId = modId
255- version = if (isSnapshots) " $modVersion +$minecraftVersion -$commitHash "
247+ version = if (isSnapshots) " $modVersion +$minecraftVersion -SNAPSHOT "
256248 else " $modVersion +$minecraftVersion "
257249
258250 from(components[" java" ])
You can’t perform that action at this time.
0 commit comments