Compare commits
5 Commits
6cad751ac5
...
030f29e7f3
Author | SHA1 | Date |
---|---|---|
Lukas Rieger (Blue) | 030f29e7f3 | |
Lukas Rieger (Blue) | f5709ce836 | |
Lukas Rieger (Blue) | 9d37bdeb15 | |
Lukas Rieger (Blue) | baeef5994e | |
Lukas Rieger (Blue) | e7e32301f2 |
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
BLUECOLORED_USERNAME: ${{ secrets.BLUECOLORED_USERNAME }}
|
||||
BLUECOLORED_PASSWORD: ${{ secrets.BLUECOLORED_PASSWORD }}
|
|
@ -33,14 +33,14 @@ val lastVersion = lastTag.substring(1) // remove the leading 'v'
|
|||
val commits = "git rev-list --count $lastTag..HEAD".runCommand()
|
||||
println("Git hash: $gitHash" + if (clean) "" else " (dirty)")
|
||||
|
||||
group = "de.bluecolored.bluemap.api"
|
||||
group = "de.bluecolored.bluemap"
|
||||
version = lastVersion +
|
||||
(if (commits == "0") "" else "-$commits") +
|
||||
(if (clean) "" else "-dirty")
|
||||
|
||||
println("Version: $version")
|
||||
|
||||
val javaTarget = 11
|
||||
val javaTarget = 16
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.toVersion(javaTarget)
|
||||
targetCompatibility = JavaVersion.toVersion(javaTarget)
|
||||
|
@ -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 {
|
||||
username = project.findProperty("bluecoloredUsername") as String? ?: System.getenv("BLUECOLORED_USERNAME")
|
||||
password = project.findProperty("bluecoloredPassword") as String? ?: System.getenv("BLUECOLORED_PASSWORD")
|
||||
}
|
||||
}
|
||||
}
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
groupId = project.group.toString()
|
||||
|
|
Loading…
Reference in New Issue