feat(ci): add drone
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
that-apex 2023-12-20 18:27:25 +01:00
parent 2c35a089ec
commit ae1dd25a9a
5 changed files with 50 additions and 13 deletions

18
.drone.yml Normal file

@ -0,0 +1,18 @@
kind: pipeline
type: docker
name: default
trigger:
event:
- push
- custom
steps:
- name: publish
pull: if-not-exists
image: openjdk:8-jdk
environment:
PACKAGESKEY:
from_secret: GITEA_PACKAGE_PUBLIC_RW
commands:
- ./gradlew --no-daemon --parallel -Pnetherite.git.packages.token=$PACKAGESKEY build publish

@ -1,6 +1,5 @@
plugins {
id "java"
id "maven-publish"
}
java {
@ -21,15 +20,4 @@ publishing {
}
}
}
repositories {
maven {
Map<String, String> systemProperties = System.getenv()
credentials {
if (systemProperties.containsKey("DIST_USERNAME")) username systemProperties.get("DIST_USERNAME")
if (systemProperties.containsKey("DIST_PASSWORD")) password systemProperties.get("DIST_PASSWORD")
}
// If the BUILD_ID enviroment variable is present that means its a Jenkins build & that it should go into the snapshots repo
url = systemProperties.containsKey("BUILD_ID") ? uri("https://repo.pyr.lol/snapshots/") : uri("https://repo.pyr.lol/releases/")
}
}
}

@ -1,8 +1,9 @@
subprojects {
apply plugin: "java"
apply plugin: 'maven-publish'
group "lol.pyr"
version "2.0.0" + (System.getenv().containsKey("BUILD_ID") ? "-SNAPSHOT" : "")
version "2.0.0-netherite-SNAPSHOT"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
@ -36,4 +37,19 @@ subprojects {
url "https://jitpack.io/"
}
}
publishing {
repositories {
maven {
url = uri("https://git.netherite.gg/api/packages/Netherite-Public/maven")
credentials(HttpHeaderCredentials) {
name "Authorization"
value "token ${project.properties["netherite.git.packages.token"]}"
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
}

0
gradlew vendored Normal file → Executable file

@ -15,6 +15,21 @@ processResources {
expand("version": version)
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = "znpcsplus-plugin"
pom {
name.set("znpcsplus-plugin")
description.set("The ZNPCsPlus plugin")
url.set("https://github.com/Pyrbu/ZNPCsPlus")
}
}
}
}
dependencies {
compileOnly "me.clip:placeholderapi:2.11.3" // Placeholder support
compileOnly "com.google.code.gson:gson:2.10.1" // JSON parsing