From afe57e97ebc095af65435311b0cfb85b36826301 Mon Sep 17 00:00:00 2001 From: JFronny Date: Mon, 27 Sep 2021 21:12:46 +0200 Subject: [PATCH] Attempt at allowing gitlab packages --- .gitlab-ci.yml | 8 ++++++-- build.gradle | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3745b69..c138868 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,11 +19,15 @@ build_test: - build/libs - latest.jar - latest-dev.jar - only: - - master deploy: stage: deploy when: manual script: - gradle --build-cache modrinth curseforge + only: + - master + +gradle-publish: + script: + - gradle publish diff --git a/build.gradle b/build.gradle index 2612a05..c3e31a6 100644 --- a/build.gradle +++ b/build.gradle @@ -209,6 +209,22 @@ task remapMavenJar(type: net.fabricmc.loom.task.RemapJarTask, dependsOn: jar) { build.dependsOn remapMavenJar publishing { + repositories { + maven { + url = "https://gitlab.com/api/v4/projects/25805200/packages/maven" + name = "gitlab" + + credentials(HttpHeaderCredentials) { + name = "Job-Token" + value = System.getenv("CI_JOB_TOKEN") + } + authentication { + header(HttpHeaderAuthentication) + } + } + } + + publications { maven(MavenPublication) { artifact(remapMavenJar) {