Skip to content

Commit

Permalink
Revert "Don't try to sign the jar"
Browse files Browse the repository at this point in the history
This reverts commit 5bce152.
  • Loading branch information
TheGlitch76 committed Jul 3, 2024
1 parent 5bce152 commit bc12a6a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,3 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CHANGELOG: ${{ steps.changelog.outputs.changelog }}
SIGNING_SERVER: ${{ secrets.SIGNING_SERVER }}
SIGNING_PGP_KEY: ${{ secrets.SIGNING_PGP_KEY }}
SIGNING_JAR_KEY: ${{ secrets.SIGNING_JAR_KEY }}
34 changes: 27 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {
id "org.quiltmc.loom" version "1.7.3" apply false
id "com.diffplug.spotless" version "6.20.0"
id "org.ajoberstar.grgit" version "3.1.0"
id "me.modmuss50.remotesign" version "0.4.0" apply false
id "me.modmuss50.mod-publish-plugin" version "0.4.5"
}

Expand Down Expand Up @@ -128,11 +129,25 @@ allprojects {
group = "org.quiltmc.quilted-fabric-api"

apply plugin: "maven-publish"
apply plugin: "me.modmuss50.remotesign"

tasks.withType(GenerateModuleMetadata) {
enabled = false
}

remoteSign {
requestUrl = ENV.SIGNING_SERVER
pgpAuthKey = ENV.SIGNING_PGP_KEY
jarAuthKey = ENV.SIGNING_JAR_KEY

useDummyForTesting = ENV.SIGNING_SERVER == null

afterEvaluate {
// PGP sign all maven publications.
sign publishing.publications.mavenJava
}
}

publishing {
setupRepositories(repositories)
}
Expand Down Expand Up @@ -287,6 +302,10 @@ allprojects {
reproducibleFileOrder = true
}

remoteSign {
sign remapJar
}

// Run this task after updating minecraft to regenerate any required resources
tasks.register('generateResources') {
group = "fabric"
Expand Down Expand Up @@ -623,8 +642,8 @@ subprojects {
pom {
addPomMetadataInformation(project, pom)
}
artifact(remapJar.output) {
builtBy(remapJar)
artifact(signRemapJar.output) {
builtBy(signRemapJar)
}

artifact(remapSourcesJar) {
Expand All @@ -643,8 +662,8 @@ subprojects {
publishing {
publications {
mavenJava(MavenPublication) {
artifact(remapJar.output) {
builtBy(remapJar)
artifact(signRemapJar.output) {
builtBy(signRemapJar)
}

artifact(sourcesJar) {
Expand Down Expand Up @@ -767,13 +786,14 @@ remapJar {
return
}

nestedJars.from project("${it.path}").tasks.getByName("remapJar")
// Include the signed or none signed jar from the sub project.
nestedJars.from project("${it.path}").tasks.getByName("signRemapJar")
}
}
}

publishMods {
file = remapJar.output
file = signRemapJar.output
changelog = "Provides Fabric API ${project.upstream_version}\n" + providers.environmentVariable("CHANGELOG").getOrElse("No changelog provided")
type = project.prerelease == "true" ? BETA : STABLE
displayName = "[$project.minecraft_version] QFAPI " + project.version.split('\\+')[0] + " and QSL " + project.qsl_version.split('\\+')[0]
Expand All @@ -797,7 +817,7 @@ publishMods {
}
}


assemble.dependsOn signRemapJar

import java.util.stream.Collectors

Expand Down

0 comments on commit bc12a6a

Please sign in to comment.