Set up sonatype publishing

This commit is contained in:
Jason Penilla committed 2023-06-08 11:19:13 -07:00
1 parent f6153905c4
commit ce17a634e7
7 files changed
+45 -19

No files matched your search

+1 -1
View File
@@ -29,5 +29,5 @@ indent_style = space
insert_final_newline = true insert_final_newline = true
max_line_length = off max_line_length = off
[{*.kt, *.kts, *.yml}] [{*.kt,*.kts,*.yml}]
indent_size = 2 indent_size = 2
+14 -12
View File
@@ -42,18 +42,20 @@ jobs:
else else
echo "STATUS=release" >> $GITHUB_ENV echo "STATUS=release" >> $GITHUB_ENV
fi fi
# - name: Publish Snapshot to Maven - name: "publish snapshot to sonatype snapshots"
# if: "${{ env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/2.1' }}" if: "${{ env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/2.1' }}"
# run: ./gradlew publish --stacktrace run: ./gradlew publish
# env: env:
# ORG_GRADLE_PROJECT_parksUsername: "${{ secrets.CI_USER }}" ORG_GRADLE_PROJECT_sonatypeUsername: "${{ secrets.SONATYPE_USERNAME }}"
# ORG_GRADLE_PROJECT_parksPassword: "${{ secrets.CI_PASS }}" ORG_GRADLE_PROJECT_sonatypePassword: "${{ secrets.SONATYPE_PASSWORD }}"
# - name: Publish (Pre-)Release to Maven - name: "publish (pre-)release to maven central"
# if: "${{ env.STATUS == 'release' && github.event_name == 'release' }}" if: "${{ env.STATUS == 'release' && github.event_name == 'release' }}"
# run: ./gradlew publish --stacktrace run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
# env: env:
# ORG_GRADLE_PROJECT_parksUsername: "${{ secrets.CI_USER }}" ORG_GRADLE_PROJECT_sonatypeUsername: "${{ secrets.SONATYPE_USERNAME }}"
# ORG_GRADLE_PROJECT_parksPassword: "${{ secrets.CI_PASS }}" ORG_GRADLE_PROJECT_sonatypePassword: "${{ secrets.SONATYPE_PASSWORD }}"
ORG_GRADLE_PROJECT_signingKey: "${{ secrets.SIGNING_KEY }}"
ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.SIGNING_PASSWORD }}"
- name: Parse tag - name: Parse tag
if: "${{ github.event_name == 'push' && contains(github.ref, '-beta.') }}" if: "${{ github.event_name == 'push' && contains(github.ref, '-beta.') }}"
id: vars id: vars
+1 -1
View File
@@ -1,5 +1,5 @@
plugins { plugins {
id("carbon.base-conventions") id("carbon.publishing-conventions")
} }
dependencies { dependencies {
@@ -2,16 +2,12 @@ plugins {
id("net.kyori.indra") id("net.kyori.indra")
id("net.kyori.indra.git") id("net.kyori.indra.git")
id("net.kyori.indra.checkstyle") id("net.kyori.indra.checkstyle")
id("net.kyori.indra.publishing")
id("net.kyori.indra.license-header") id("net.kyori.indra.license-header")
} }
indra { indra {
gpl3OnlyLicense() gpl3OnlyLicense()
publishReleasesTo("parksReleases", "https://repo.parks.dev/repository/maven-releases/")
publishSnapshotsTo("parksSnapshots", "https://repo.parks.dev/repository/maven-snapshots/")
javaVersions { javaVersions {
target(17) target(17)
} }
@@ -0,0 +1,22 @@
plugins {
id("carbon.base-conventions")
id("net.kyori.indra.publishing")
}
signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
}
indra {
configurePublications {
pom {
developers {
//developer {
//}
}
}
}
}
+5
View File
@@ -3,6 +3,7 @@ import io.papermc.hangarpublishplugin.model.Platforms
plugins { plugins {
id("carbon.build-logic") id("carbon.build-logic")
id("io.papermc.hangar-publish-plugin") id("io.papermc.hangar-publish-plugin")
id("net.kyori.indra.publishing.sonatype")
} }
group = "net.draycia" group = "net.draycia"
@@ -50,3 +51,7 @@ hangarPublish.publications.register("plugin") {
} }
} }
} }
indraSonatype {
useAlternateSonatypeOSSHost("s01")
}
+2 -1
View File
@@ -9,9 +9,10 @@ plugins:
xyz.jpenilla.run-paper: &run-task 2.1.0 xyz.jpenilla.run-paper: &run-task 2.1.0
xyz.jpenilla.run-velocity: *run-task xyz.jpenilla.run-velocity: *run-task
io.papermc.hangar-publish-plugin: 0.0.5 io.papermc.hangar-publish-plugin: 0.0.5
net.kyori.indra.publishing.sonatype: &indra 3.0.1
versions: versions:
indra: 3.0.1 indra: *indra
licenser: 0.6.1 licenser: 0.6.1
shadow: 8.1.0 shadow: 8.1.0
adventure: 4.13.0 adventure: 4.13.0