feat(ci): add drone
# Conflicts: # build.gradle
This commit is contained in:
parent
ca8a1d6499
commit
c521eb9a51
5 changed files with 52 additions and 13 deletions
18
.drone.yml
Normal file
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/")
|
||||
}
|
||||
}
|
||||
}
|
20
build.gradle
20
build.gradle
|
@ -2,7 +2,7 @@ subprojects {
|
|||
apply plugin: "java"
|
||||
|
||||
group "lol.pyr"
|
||||
version "2.1.0" + (System.getenv().containsKey("BUILD_ID") ? "-SNAPSHOT" : "")
|
||||
version "2.1.0-netherite-SNAPSHOT"
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
|
||||
|
@ -33,5 +33,23 @@ subprojects {
|
|||
maven {
|
||||
url "https://repo.pyr.lol/releases"
|
||||
}
|
||||
maven {
|
||||
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
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.6" // Placeholder support
|
||||
implementation "com.google.code.gson:gson:2.10.1" // JSON parsing
|
||||
|
|
Loading…
Reference in a new issue