Add publishing to maven repo

This commit is contained in:
William committed 2023-05-07 22:30:01 +01:00
1 parent 4c21a930ef
commit 81cebbbb52
3 files changed
+33 -2

No files matched your search

+4 -1
View File
@@ -26,7 +26,10 @@ jobs:
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build test
arguments: build test publish
env:
SNAPSHOTS_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
SNAPSHOTS_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: success() || failure() # always run even if the previous step fails
+4 -1
View File
@@ -22,7 +22,10 @@ jobs:
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build test
arguments: build test publish
env:
RELEASES_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
RELEASES_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: success() || failure() # always run even if the previous step fails
+25
View File
@@ -107,6 +107,31 @@ subprojects {
shadowJar.dependsOn(sourcesJar, javadocJar)
publishing {
repositories {
maven {
name = "william278-releases"
url = "https://repo.william278.net/releases"
credentials {
username = System.getenv("RELEASES_MAVEN_USERNAME")
password = System.getenv("RELEASES_MAVEN_PASSWORD")
}
authentication {
basic(BasicAuthentication)
}
}
maven {
name = "william278-snapshots"
url = "https://repo.william278.net/snapshots"
credentials {
username = System.getenv("SNAPSHOTS_MAVEN_USERNAME")
password = System.getenv("SNAPSHOTS_MAVEN_PASSWORD")
}
authentication {
basic(BasicAuthentication)
}
}
}
publications {
mavenJava(MavenPublication) {
groupId = 'net.william278'