mirror of https://github.com/usbharu/Hideout.git
commit
d8d6d053f7
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"projects": {
|
||||||
|
"./hideout-activitypub": "hideout-activitypub",
|
||||||
|
"./hideout-core": "hideout-core",
|
||||||
|
"./hideout-mastodon": "hideout-mastodon",
|
||||||
|
"./owl": "owl"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,78 @@
|
||||||
|
name: master-publish-package.yaml
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
- "release-test-master"
|
||||||
|
jobs:
|
||||||
|
release-diff-check:
|
||||||
|
name: Release diff check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
diff: ${{ steps.check-diff.outputs.result }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: fetch git
|
||||||
|
run: git fetch --depth 1 origin
|
||||||
|
|
||||||
|
- name: Check diff
|
||||||
|
id: check-diff
|
||||||
|
uses: actions/github-script@v3
|
||||||
|
with:
|
||||||
|
result-encoding: 'json'
|
||||||
|
script: |
|
||||||
|
const fs = require('fs')
|
||||||
|
const {execSync} = require('child_process');
|
||||||
|
const jsonData = JSON.parse(fs.readFileSync('./.github/monorepo.json', 'utf8'));
|
||||||
|
const baseRef = context.payload.pull_request.base.ref
|
||||||
|
console.log(baseRef)
|
||||||
|
var tags = []
|
||||||
|
|
||||||
|
for (let [key, value] of Object.entries(jsonData.projects)) {
|
||||||
|
console.log(execSync("git branch", {encoding: 'utf8'}))
|
||||||
|
const command = "git diff origin/" + baseRef + " -- HEAD --name-only --relative=" + key + "\n";
|
||||||
|
const output = execSync(command, {encoding: 'utf8'});
|
||||||
|
console.log(output)
|
||||||
|
if (output.trim() === '') {
|
||||||
|
tags.push(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tags
|
||||||
|
|
||||||
|
- name: show diff
|
||||||
|
env:
|
||||||
|
DIFF: ${{ steps.check-diff.outputs.result }}
|
||||||
|
run: echo "$DIFF"
|
||||||
|
|
||||||
|
publish-package:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: release-diff-check
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Gradle Wrapper Validation
|
||||||
|
uses: gradle/actions/wrapper-validation@v4
|
||||||
|
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '21'
|
||||||
|
distribution: 'temurin'
|
||||||
|
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
with:
|
||||||
|
cache-read-only: false
|
||||||
|
gradle-home-cache-cleanup: true
|
||||||
|
|
||||||
|
- name: Publish OWL Local
|
||||||
|
if: ${{ github.base_ref == 'release-test-master' && contains( needs.release-diff-check.outputs.diff, 'owl') }}
|
||||||
|
run: ./owl/gradlew :owl:publishMavenPublicationToMavenLocal
|
||||||
|
|
||||||
|
- name: Publish OWL Gitea
|
||||||
|
|
||||||
|
if: ${{ github.base_ref == 'master' && contains( needs.release-diff-check.outputs.diff , 'owl')}}
|
||||||
|
run: ./owl/gradlew :owl:publishMavenPublicationToGiteaRepository
|
|
@ -2,6 +2,8 @@ name: PullRequest Merge Check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- 'owl/**'
|
||||||
branches:
|
branches:
|
||||||
- "develop"
|
- "develop"
|
||||||
types:
|
types:
|
||||||
|
|
|
@ -2,5 +2,3 @@ org.gradle.parallel=true
|
||||||
org.gradle.configureondemand=true
|
org.gradle.configureondemand=true
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.jvmargs=-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED -XX:TieredStopAtLevel=1 -noverify
|
org.gradle.jvmargs=-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED -XX:TieredStopAtLevel=1 -noverify
|
||||||
org.gradle.configuration-cache=true
|
|
||||||
org.gradle.configuration-cache.problems=warn
|
|
|
@ -12,7 +12,6 @@ plugins {
|
||||||
alias(libs.plugins.kotlin.spring)
|
alias(libs.plugins.kotlin.spring)
|
||||||
alias(libs.plugins.kover)
|
alias(libs.plugins.kover)
|
||||||
alias(libs.plugins.license.report)
|
alias(libs.plugins.license.report)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply {
|
apply {
|
||||||
|
@ -82,8 +81,8 @@ dependencies {
|
||||||
implementation(libs.bundles.ktor.client)
|
implementation(libs.bundles.ktor.client)
|
||||||
implementation(libs.bundles.apache.tika)
|
implementation(libs.bundles.apache.tika)
|
||||||
implementation(libs.bundles.openapi)
|
implementation(libs.bundles.openapi)
|
||||||
implementation(libs.bundles.owl.producer)
|
// implementation(libs.bundles.owl.producer)
|
||||||
implementation(libs.bundles.owl.broker)
|
// implementation(libs.bundles.owl.broker)
|
||||||
implementation(libs.bundles.spring.boot.oauth2)
|
implementation(libs.bundles.spring.boot.oauth2)
|
||||||
implementation(libs.bundles.spring.boot.data.mongodb)
|
implementation(libs.bundles.spring.boot.data.mongodb)
|
||||||
implementation("org.springframework.boot:spring-boot-starter-actuator")
|
implementation("org.springframework.boot:spring-boot-starter-actuator")
|
||||||
|
@ -104,7 +103,7 @@ dependencies {
|
||||||
implementation(libs.flyway.core)
|
implementation(libs.flyway.core)
|
||||||
runtimeOnly(libs.flyway.postgresql)
|
runtimeOnly(libs.flyway.postgresql)
|
||||||
|
|
||||||
implementation("dev.usbharu:owl-common-serialize-jackson:0.0.1")
|
// implementation("dev.usbharu:owl-common-serialize-jackson:0.0.1")
|
||||||
|
|
||||||
implementation(libs.javacv) {
|
implementation(libs.javacv) {
|
||||||
exclude(module = "opencv")
|
exclude(module = "opencv")
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.kotlin.jvm)
|
alias(libs.plugins.kotlin.jvm)
|
||||||
|
id("maven-publish")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,9 +14,19 @@ allprojects {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks {
|
||||||
|
create("publishMavenPublicationToMavenLocal") {
|
||||||
|
subprojects.forEach { dependsOn("${it.path}:publishMavenPublicationToMavenLocal") }
|
||||||
|
}
|
||||||
|
create("publishMavenPublicationToGiteaRepository") {
|
||||||
|
subprojects.forEach { dependsOn("${it.path}:publishMavenPublicationToGiteaRepository") }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
apply {
|
apply {
|
||||||
plugin("org.jetbrains.kotlin.jvm")
|
plugin("org.jetbrains.kotlin.jvm")
|
||||||
|
plugin("maven-publish")
|
||||||
}
|
}
|
||||||
kotlin {
|
kotlin {
|
||||||
jvmToolchain(21)
|
jvmToolchain(21)
|
||||||
|
@ -28,10 +39,34 @@ subprojects {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tasks.test {
|
tasks.test {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "Gitea"
|
||||||
|
url = uri("https://git.usbharu.dev/api/packages/usbharu/maven")
|
||||||
|
|
||||||
|
credentials(HttpHeaderCredentials::class) {
|
||||||
|
name = "Authorization"
|
||||||
|
value = "token " + (project.findProperty("gpr.gitea") as String? ?: System.getenv("GITEA"))
|
||||||
|
}
|
||||||
|
|
||||||
|
authentication {
|
||||||
|
create<HttpHeaderAuthentication>("header")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
publications {
|
||||||
|
register<MavenPublication>("maven") {
|
||||||
|
groupId = "dev.usbharu"
|
||||||
|
artifactId = project.name
|
||||||
|
version = project.version.toString()
|
||||||
|
from(components["kotlin"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -2,6 +2,3 @@ kotlin.code.style=official
|
||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
org.gradle.configureondemand=true
|
org.gradle.configureondemand=true
|
||||||
#ksp.useKSP2=true
|
|
||||||
org.gradle.configuration-cache=true
|
|
||||||
org.gradle.configuration-cache.problems=warn
|
|
Loading…
Reference in New Issue