Skip to content

Commit

Permalink
publishing is done!
Browse files Browse the repository at this point in the history
  • Loading branch information
OroArmor committed Mar 5, 2021
1 parent fc9c809 commit 3d96f7a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .build/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ gpg --fast-import --no-tty --batch --yes eliorona-sign.asc

echo "📦 Publishing..."

./gradlew uploadArchives
./gradlew uploadArchives -Psign=true

echo "✅ Done!"
9 changes: 5 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ jobs:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew bintrayUpload --parallel --stacktrace
- name: Grant execute permission for deploy script
run: chmod +x .build/deploy.sh
- name: Deploy with Gradle
run: ./.build/deploy.sh
env:
BINTRAY_USER: oroarmor
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}
11 changes: 4 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ subprojects {
mappings "net.fabricmc:yarn:1.16.5+build.4"
}

remapJar {
classifier project.name
}

task sourceJar(type: Jar) {
classifier project.name + "-sources"
classifier "sources"
from sourceSets.main.allSource
}

Expand All @@ -42,12 +38,13 @@ subprojects {
}

tasks.withType(Sign) {
onlyIf { gradle.taskGraph.hasTask("publish") && project.hasProperty("sign") }
onlyIf { project.hasProperty("sign") }
}

println(project.hasProperty("sign"))

if(project.hasProperty("sign")) {
signing {
required { gradle.taskGraph.hasTask("publish") && project.hasProperty("sign") }
useGpgCmd()
sign configurations.archives
}
Expand Down
6 changes: 4 additions & 2 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ configurations {
shadowCommon
}

archivesBaseName = rootProject.archives_base_name + "-fabric"
version = rootProject.mod_version
group = rootProject.maven_group

dependencies {
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"

Expand Down Expand Up @@ -55,7 +59,6 @@ shadowJar {
remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier "fabric"
}

jar {
Expand All @@ -75,7 +78,6 @@ sourcesJar {
publishing {
publications {
mavenFabric(MavenPublication) {
artifactId = rootProject.archives_base_name + "-" + project.name
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
classifier null
Expand Down
6 changes: 4 additions & 2 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ artifacts {
dev(jar)
}

archivesBaseName = rootProject.archives_base_name + "-forge"
version = rootProject.mod_version
group = rootProject.maven_group

dependencies {
forge "net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}"
// Remove the next line if you don't want to depend on the API
Expand Down Expand Up @@ -48,7 +52,6 @@ shadowJar {
remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier "forge"

manifest {
getAttributes()["FMLModType"] = "LIBRARY"
Expand Down Expand Up @@ -76,7 +79,6 @@ sourcesJar {
publishing {
publications {
mavenForge(MavenPublication) {
artifactId = rootProject.archives_base_name + "-" + project.name
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
classifier null
Expand Down

0 comments on commit 3d96f7a

Please sign in to comment.