Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0"
}
10 changes: 10 additions & 0 deletions .github/release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "simple",
"tag-separator": "",
"include-v-in-tag": true,
"versioning": "semver",
"packages": {
".": {}
}
}
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -25,3 +29,10 @@ jobs:

- name: Build
run: ./gradlew build

- name: Publish
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(main): release')
run: ./gradlew publish
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PR Lint

on:
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
pr-title:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

commit-messages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: wagoid/commitlint-github-action@v6.2.1
19 changes: 19 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release Please

on:
push:
branches: [main]

jobs:
release-please:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- uses: googleapis/release-please-action@v5
with:
config-file: .github/release-please-config.json
manifest-file: .github/.release-please-manifest.json
23 changes: 23 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
plugins {
alias(libs.plugins.git.versioning)
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.ktlint) apply false
alias(libs.plugins.kover) apply false
}

version = "0.0.0-SNAPSHOT"
group = "net.oxspring.markflow"

gitVersioning.apply {
refs {
tag("v(?<version>.+)") {
version = "\${ref.version}"
}
branch(".+") {
version = "\${ref}-SNAPSHOT"
}
}
rev {
version = "\${commit}-SNAPSHOT"
}
}

subprojects {
version = rootProject.version
group = rootProject.group
}
16 changes: 16 additions & 0 deletions gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("markflow.convention")
`java-gradle-plugin`
`maven-publish`
}

dependencies {
Expand All @@ -15,6 +16,21 @@ gradlePlugin {
create("markflow") {
id = "net.oxspring.markflow"
implementationClass = "net.oxspring.markflow.gradle.MarkflowPlugin"
displayName = "Markflow"
description = "Gradle plugin for Markdown processing pipelines"
}
}
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/roxspring/markflow")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
Expand Down
12 changes: 7 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
[versions]
kotlin = "2.2.0"
assertj = "3.27.3"
flexmark = "0.64.8"
git-versioning = "6.4.4"
jacksonYaml = "2.19.0"
junit5 = "6.1.3"
assertj = "3.27.3"
ktlint-gradle = "12.1.1"
kotlin = "2.2.0"
kover = "0.9.9"
ktlint-gradle = "12.1.1"

[libraries]
assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertj" }
flexmark-all = { module = "com.vladsch.flexmark:flexmark-all", version.ref = "flexmark" }
jackson-dataformat-yaml = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", version.ref = "jacksonYaml" }
jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jacksonYaml" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit5" }
assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertj" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }

[plugins]
git-versioning = { id = "me.qoomon.git-versioning", version.ref = "git-versioning" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint-gradle" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint-gradle" }
43 changes: 43 additions & 0 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
plugins {
id("markflow.convention")
`java-library`
`maven-publish`
}

dependencies {
Expand All @@ -11,6 +13,47 @@ dependencies {
testImplementation(libs.assertj.core)
}

java {
withSourcesJar()
withJavadocJar()
}

publishing {
publications {
create<MavenPublication>("library") {
from(components["java"])

pom {
name = "markflow"
description = "Kotlin/JVM library for Markdown processing pipelines"
url = "https://github.com/roxspring/markflow"
licenses {
license {
name = "Apache-2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0"
}
}
scm {
connection = "scm:git:git://github.com/roxspring/markflow.git"
developerConnection = "scm:git:ssh://github.com/roxspring/markflow.git"
url = "https://github.com/roxspring/markflow"
}
}
}
}

repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/roxspring/markflow")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}

kover {
reports {
total {
Expand Down
Loading