Skip to content

Commit baeef59

Browse files
committed
Publish to BlueColored Maven Repo
1 parent e7e3230 commit baeef59

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
uses: actions/setup-java@v3
1515
with:
1616
distribution: 'temurin'
17-
java-version: 11
17+
java-version: 16
1818
cache: 'gradle'
1919
- name: Build with Gradle
2020
run: ./gradlew clean build test

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish
2+
3+
on:
4+
- workflow_dispatch
5+
- release:
6+
types: [published]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
submodules: recursive
15+
fetch-depth: 0 # needed for versioning
16+
- name: Set up Java
17+
uses: actions/setup-java@v3
18+
with:
19+
distribution: 'temurin'
20+
java-version: 16
21+
cache: 'gradle'
22+
- name: Build with Gradle
23+
run: ./gradlew publish
24+
env:
25+
bluecoloredUsername: ${{ secrets.BLUECOLORED_USERNAME }}
26+
bluecoloredPassword: ${{ secrets.BLUECOLORED_PASSWORD }}

build.gradle.kts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ tasks.javadoc {
8989
"https://javadoc.io/doc/com.flowpowered/flow-math/1.0.3/",
9090
"https://javadoc.io/doc/com.google.code.gson/gson/2.8.0/",
9191
)
92+
if (JavaVersion.current().isJava9Compatible)
93+
addBooleanOption("html5", true)
9294
}
9395
}
9496
}
@@ -106,6 +108,20 @@ tasks.processResources {
106108
}
107109

108110
publishing {
111+
repositories {
112+
maven {
113+
name = "bluecolored"
114+
115+
val releasesRepoUrl = "https://repo.bluecolored.de/releases"
116+
val snapshotsRepoUrl = "https://repo.bluecolored.de/snapshots"
117+
url = uri(if (version == lastVersion) releasesRepoUrl else snapshotsRepoUrl)
118+
119+
credentials(PasswordCredentials::class)
120+
authentication {
121+
create<BasicAuthentication>("basic")
122+
}
123+
}
124+
}
109125
publications {
110126
create<MavenPublication>("maven") {
111127
groupId = project.group.toString()

0 commit comments

Comments
 (0)