Skip to content

Commit

Permalink
Closes 57 (#58)
Browse files Browse the repository at this point in the history
* Closes 57
  • Loading branch information
nachg authored May 21, 2021
1 parent 2013143 commit 060b308
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/badges/branches.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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

14 changes: 10 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 {
Expand All @@ -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")
Expand Down Expand Up @@ -114,6 +116,10 @@ signing {
sign(publishing.publications["mavenJava"])
}

nexusStaging {
serverUrl = "https://s01.oss.sonatype.org/service/local/"
}

tasks.test {
useJUnitPlatform()
testLogging {
Expand All @@ -127,7 +133,7 @@ tasks.test {
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "15"
kotlinOptions.jvmTarget = "11"
}

tasks.jar {
Expand Down

0 comments on commit 060b308

Please sign in to comment.