Publish to BlueColored Maven Repo

This commit is contained in:
Lukas Rieger (Blue) 2024-04-03 22:45:31 +02:00
parent e7e32301f2
commit baeef5994e
No known key found for this signature in database
GPG Key ID: AA33883B1BBA03E6
3 changed files with 43 additions and 1 deletions

View File

@ -14,7 +14,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
java-version: 16
cache: 'gradle'
- name: Build with Gradle
run: ./gradlew clean build test

26
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Publish
on:
- workflow_dispatch
- release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0 # needed for versioning
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 16
cache: 'gradle'
- name: Build with Gradle
run: ./gradlew publish
env:
bluecoloredUsername: ${{ secrets.BLUECOLORED_USERNAME }}
bluecoloredPassword: ${{ secrets.BLUECOLORED_PASSWORD }}

View File

@ -89,6 +89,8 @@ tasks.javadoc {
"https://javadoc.io/doc/com.flowpowered/flow-math/1.0.3/",
"https://javadoc.io/doc/com.google.code.gson/gson/2.8.0/",
)
if (JavaVersion.current().isJava9Compatible)
addBooleanOption("html5", true)
}
}
}
@ -106,6 +108,20 @@ tasks.processResources {
}
publishing {
repositories {
maven {
name = "bluecolored"
val releasesRepoUrl = "https://repo.bluecolored.de/releases"
val snapshotsRepoUrl = "https://repo.bluecolored.de/snapshots"
url = uri(if (version == lastVersion) releasesRepoUrl else snapshotsRepoUrl)
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = project.group.toString()