diff --git a/.github/badges/branches.svg b/.github/badges/branches.svg index f1e7e72..230ac2a 100644 --- a/.github/badges/branches.svg +++ b/.github/badges/branches.svg @@ -1 +1 @@ -branches82.8% \ No newline at end of file +branches81.7% \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d58fd0f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +# This is a basic workflow to help you get started with Actions + +name: release + +# Controls when the action will run. +on: + release: + types: [published] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 15 + uses: actions/setup-java@v1 + with: + java-version: 15 + + - name: Cache Gradle packages + uses: actions/cache@v1 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build with Gradle + run: ./gradlew clean build + + - name: Publish to sonartype + run: ./gradlew publish + + - name: Release to central + run: ./gradlew closeAndReleaseRepository + diff --git a/build.gradle.kts b/build.gradle.kts index dd5abb3..e37c7fe 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,7 +23,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.gradle.api.tasks.testing.logging.TestLogEvent -version = "0.0.4" +version = "0.0.5" plugins { kotlin("jvm") version "1.5.0" @@ -33,13 +33,14 @@ plugins { maven `maven-publish` signing + id("io.codearte.nexus-staging") version "0.30.0" } java { withJavadocJar() withSourcesJar() - sourceCompatibility = JavaVersion.VERSION_15 - targetCompatibility = JavaVersion.VERSION_15 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } jacoco { @@ -51,6 +52,7 @@ repositories { } dependencies { + implementation("io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0") implementation("org.jetbrains.kotlin:kotlin-reflect:1.5.0") implementation("org.yaml:snakeyaml:1.28") implementation("org.reflections:reflections:0.9.12") @@ -114,6 +116,10 @@ signing { sign(publishing.publications["mavenJava"]) } +nexusStaging { + serverUrl = "https://s01.oss.sonatype.org/service/local/" +} + tasks.test { useJUnitPlatform() testLogging { @@ -127,7 +133,7 @@ tasks.test { } tasks.withType { - kotlinOptions.jvmTarget = "15" + kotlinOptions.jvmTarget = "11" } tasks.jar {