From 339a975f51e9c39a3711f4b105b5c6fe0d914016 Mon Sep 17 00:00:00 2001 From: 90 <90@national.shitposting.agency> Date: Wed, 21 Dec 2022 01:26:42 +0000 Subject: [PATCH] PISS --- .github/workflows/release.yml | 7 +++++-- build.gradle | 22 +++++++++++++++++----- gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb88830a..3752955a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,9 @@ on: release: types: [published] +permissions: + contents: write + jobs: release: runs-on: ubuntu-latest @@ -22,10 +25,10 @@ jobs: env: MEGA_VERSION: ${{ github.event.release.tag_name }} run: ./gradlew build --max-workers 1 - - name: Upload Release Artifact + - name: Upload release artifacts uses: softprops/action-gh-release@v1 with: - files: build/libs/megacells-*.jar + files: 'build/libs/megacells-*.jar' tag_name: ${{ github.event.release.tag_name }} - name: Upload to mod repositories env: diff --git a/build.gradle b/build.gradle index f83c13ae..5e7b3a55 100644 --- a/build.gradle +++ b/build.gradle @@ -39,6 +39,14 @@ subprojects { } } +tasks.register('collectJars', Copy) { + def tasks = [project("fabric").tasks.remapJar, project(":forge").tasks.remapJar] + dependsOn tasks + + from tasks + into file("${buildDir}/libs").absolutePath +} + allprojects { apply plugin: "java" apply plugin: "architectury-plugin" @@ -147,6 +155,10 @@ allprojects { options.release = 17 } + assemble { + dependsOn collectJars + } + java { withSourcesJar() } @@ -162,7 +174,7 @@ allprojects { project { gameVersions = [minecraft_version] gameLoaders = [project.name] - version = project.name + "-" + project.version + "-" + minecraft_version + version = project.name + "-" + project.version def loader = project.name.substring(0, 1).toUpperCase() + project.name.substring(1) def releaseChannel = "release" @@ -177,7 +189,7 @@ allprojects { releaseType = releaseChannel changelog = changes - displayName = String.format("%s (%s %s)", project.version, loader, minecraft_version) + displayName = String.format("%s (%s %s)", project.version.substring(0, project.version.indexOf("-")), loader, minecraft_version) mainPublication remapJar // Declares the publicated jar @@ -188,12 +200,12 @@ allprojects { } optional { curseforge = "applied-energistics-2-wireless-terminals" + curseforge = "applied-botanics-addon" modrinth = "applied-energistics-2-wireless-terminals" } if (project.name == "forge") { optional { curseforge = "applied-mekanistics" - curseforge = "applied-botanics-addon" modrinth = "applied-mekanistics" } } @@ -203,7 +215,7 @@ allprojects { if (cfToken != null) { curseforge { token = cfToken - id = "622112" // Required, must be a string, ID of CurseForge project + id = "622112" } } @@ -211,7 +223,7 @@ allprojects { if (mrToken != null) { modrinth { token = mrToken - id = "7QZJE3uU" // Required, must be a string, ID of Modrinth project + id = "7QZJE3uU" } } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8049c684..070cb702 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists