mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Set up sonatype publishing
This commit is contained in:
7 files changed
+45
-19
No files matched your search
+1
-1
@@ -29,5 +29,5 @@ indent_style = space
|
||||
insert_final_newline = true
|
||||
max_line_length = off
|
||||
|
||||
[{*.kt, *.kts, *.yml}]
|
||||
[{*.kt,*.kts,*.yml}]
|
||||
indent_size = 2
|
||||
+14
-12
@@ -42,18 +42,20 @@ jobs:
|
||||
else
|
||||
echo "STATUS=release" >> $GITHUB_ENV
|
||||
fi
|
||||
# - name: Publish Snapshot to Maven
|
||||
# if: "${{ env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/2.1' }}"
|
||||
# run: ./gradlew publish --stacktrace
|
||||
# env:
|
||||
# ORG_GRADLE_PROJECT_parksUsername: "${{ secrets.CI_USER }}"
|
||||
# ORG_GRADLE_PROJECT_parksPassword: "${{ secrets.CI_PASS }}"
|
||||
# - name: Publish (Pre-)Release to Maven
|
||||
# if: "${{ env.STATUS == 'release' && github.event_name == 'release' }}"
|
||||
# run: ./gradlew publish --stacktrace
|
||||
# env:
|
||||
# ORG_GRADLE_PROJECT_parksUsername: "${{ secrets.CI_USER }}"
|
||||
# ORG_GRADLE_PROJECT_parksPassword: "${{ secrets.CI_PASS }}"
|
||||
- name: "publish snapshot to sonatype snapshots"
|
||||
if: "${{ env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/2.1' }}"
|
||||
run: ./gradlew publish
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_sonatypeUsername: "${{ secrets.SONATYPE_USERNAME }}"
|
||||
ORG_GRADLE_PROJECT_sonatypePassword: "${{ secrets.SONATYPE_PASSWORD }}"
|
||||
- name: "publish (pre-)release to maven central"
|
||||
if: "${{ env.STATUS == 'release' && github.event_name == 'release' }}"
|
||||
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_sonatypeUsername: "${{ secrets.SONATYPE_USERNAME }}"
|
||||
ORG_GRADLE_PROJECT_sonatypePassword: "${{ secrets.SONATYPE_PASSWORD }}"
|
||||
ORG_GRADLE_PROJECT_signingKey: "${{ secrets.SIGNING_KEY }}"
|
||||
ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.SIGNING_PASSWORD }}"
|
||||
- name: Parse tag
|
||||
if: "${{ github.event_name == 'push' && contains(github.ref, '-beta.') }}"
|
||||
id: vars
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("carbon.base-conventions")
|
||||
id("carbon.publishing-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -2,16 +2,12 @@ plugins {
|
||||
id("net.kyori.indra")
|
||||
id("net.kyori.indra.git")
|
||||
id("net.kyori.indra.checkstyle")
|
||||
id("net.kyori.indra.publishing")
|
||||
id("net.kyori.indra.license-header")
|
||||
}
|
||||
|
||||
indra {
|
||||
gpl3OnlyLicense()
|
||||
|
||||
publishReleasesTo("parksReleases", "https://repo.parks.dev/repository/maven-releases/")
|
||||
publishSnapshotsTo("parksSnapshots", "https://repo.parks.dev/repository/maven-snapshots/")
|
||||
|
||||
javaVersions {
|
||||
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 {
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import io.papermc.hangarpublishplugin.model.Platforms
|
||||
plugins {
|
||||
id("carbon.build-logic")
|
||||
id("io.papermc.hangar-publish-plugin")
|
||||
id("net.kyori.indra.publishing.sonatype")
|
||||
}
|
||||
|
||||
group = "net.draycia"
|
||||
@@ -50,3 +51,7 @@ hangarPublish.publications.register("plugin") {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
indraSonatype {
|
||||
useAlternateSonatypeOSSHost("s01")
|
||||
}
|
||||
@@ -9,9 +9,10 @@ plugins:
|
||||
xyz.jpenilla.run-paper: &run-task 2.1.0
|
||||
xyz.jpenilla.run-velocity: *run-task
|
||||
io.papermc.hangar-publish-plugin: 0.0.5
|
||||
net.kyori.indra.publishing.sonatype: &indra 3.0.1
|
||||
|
||||
versions:
|
||||
indra: 3.0.1
|
||||
indra: *indra
|
||||
licenser: 0.6.1
|
||||
shadow: 8.1.0
|
||||
adventure: 4.13.0
|
||||
|
||||
Reference in new issue
Block a user