Skip to content

Commit

Permalink
Merge branch 'master' into Add-Aura-PlayerLook-Remove
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 authored Nov 5, 2024
2 parents 10e9dbc + 635bff4 commit 793c601
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
path: run/screenshots

- name: Create test screenshot gallery
if: always() && ${{ env.IMGUR_CLIENT_ID }}
if: ${{ env.IMGUR_CLIENT_ID && (success() || failure()) }}
shell: bash
run: |
echo "<details open>" >> $GITHUB_STEP_SUMMARY
Expand Down
13 changes: 1 addition & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,10 @@ test {
useJUnitPlatform()
}

task moveDevLibs(dependsOn: [remapJar, remapSourcesJar]) {
doLast {
def archivesName = project.base.archivesName.get() as String
ant.move(file:"${project.buildDir}/devlibs/${archivesName}-${version}-dev.jar", tofile:"${project.buildDir}/libs/${archivesName}-${version}-dev.jar")
ant.move(file:"${project.buildDir}/devlibs/${archivesName}-${version}-sources.jar", tofile:"${project.buildDir}/libs/${archivesName}-${version}-sources-dev.jar")
}
}

import org.kohsuke.github.GHReleaseBuilder
import org.kohsuke.github.GitHub

task github(dependsOn: moveDevLibs) {
task github(dependsOn: build) {
onlyIf {
ENV.GITHUB_TOKEN
}
Expand All @@ -169,7 +161,6 @@ task github(dependsOn: moveDevLibs) {
def github = GitHub.connectUsingOAuth(ENV.GITHUB_TOKEN as String)
def repository = github.getRepository("Wurst-Imperium/Wurst-MCX2")
def ghVersion = version.substring(0, version.indexOf("-"))
def archivesName = project.base.archivesName.get() as String

def ghRelease = repository.getReleaseByTagName(ghVersion as String)
if(ghRelease == null) {
Expand All @@ -180,7 +171,5 @@ task github(dependsOn: moveDevLibs) {

ghRelease.uploadAsset(remapJar.archiveFile.get().getAsFile(), "application/java-archive")
ghRelease.uploadAsset(remapSourcesJar.archiveFile.get().getAsFile(), "application/java-archive")
ghRelease.uploadAsset(new File("${project.buildDir}/libs/${archivesName}-${version}-dev.jar"), "application/java-archive")
ghRelease.uploadAsset(new File("${project.buildDir}/libs/${archivesName}-${version}-sources-dev.jar"), "application/java-archive")
}
}

0 comments on commit 793c601

Please sign in to comment.