Hopefully finish CI
This commit is contained in:
parent
ffcff31583
commit
33cbe662d5
|
@ -9,7 +9,7 @@ before_script:
|
|||
build_test:
|
||||
stage: deploy
|
||||
script:
|
||||
- gradle --build-cache assemble
|
||||
- gradle --build-cache assemble publish
|
||||
- cp build/libs/* ./
|
||||
- mv *-dev.jar tmp.zip
|
||||
- mv *.jar latest.jar
|
||||
|
@ -24,10 +24,7 @@ deploy:
|
|||
stage: deploy
|
||||
when: manual
|
||||
script:
|
||||
- gradle --build-cache publish modrinth curseforge
|
||||
- gradle --build-cache publish modrinth curseforge -Ptype=release
|
||||
only:
|
||||
- master
|
||||
|
||||
log_id:
|
||||
script:
|
||||
- echo "$CI_PIPELINE_IID et $CI_PIPELINE_ID"
|
||||
|
|
16
build.gradle
16
build.gradle
|
@ -9,7 +9,9 @@ plugins {
|
|||
id "com.modrinth.minotaur" version "1.1.0"
|
||||
}
|
||||
|
||||
version = "$project.mod_version"
|
||||
def ENV = System.getenv()
|
||||
def IsRelease = project.hasProperty('type') && project.getProperty('type').equals("release")
|
||||
version = "$project.mod_version" + (IsRelease ? (ENV.CI_PIPELINE_ID ? "+" + ENV.CI_PIPELINE_ID : "") : "")
|
||||
|
||||
static Node getOrCreateNode(Node node, String name) {
|
||||
Node dependencies = null
|
||||
|
@ -185,7 +187,7 @@ subprojects {
|
|||
|
||||
credentials(HttpHeaderCredentials) {
|
||||
name = "Job-Token"
|
||||
value = System.getenv("CI_JOB_TOKEN")
|
||||
value = ENV.CI_JOB_TOKEN
|
||||
}
|
||||
authentication {
|
||||
header(HttpHeaderAuthentication)
|
||||
|
@ -233,7 +235,7 @@ publishing {
|
|||
|
||||
credentials(HttpHeaderCredentials) {
|
||||
name = "Job-Token"
|
||||
value = System.getenv("CI_JOB_TOKEN")
|
||||
value = ENV.CI_JOB_TOKEN
|
||||
}
|
||||
authentication {
|
||||
header(HttpHeaderAuthentication)
|
||||
|
@ -268,10 +270,10 @@ dependencies {
|
|||
|
||||
task modrinth(type: com.modrinth.minotaur.TaskModrinthUpload, dependsOn: remapJar) {
|
||||
onlyIf {
|
||||
System.getenv().MODRINTH_API_TOKEN
|
||||
ENV.MODRINTH_API_TOKEN
|
||||
}
|
||||
|
||||
token = System.getenv().MODRINTH_API_TOKEN
|
||||
token = ENV.MODRINTH_API_TOKEN
|
||||
projectId = "WKwQAwke"
|
||||
versionNumber = version
|
||||
versionName = "[${project.minecraft_version}] ${project.mod_version}"
|
||||
|
@ -281,8 +283,8 @@ task modrinth(type: com.modrinth.minotaur.TaskModrinthUpload, dependsOn: remapJa
|
|||
}
|
||||
|
||||
curseforge {
|
||||
if (System.getenv().CURSEFORGE_API_TOKEN) {
|
||||
apiKey = System.getenv().CURSEFORGE_API_TOKEN
|
||||
if (ENV.CURSEFORGE_API_TOKEN) {
|
||||
apiKey = ENV.CURSEFORGE_API_TOKEN
|
||||
} else {
|
||||
println "No CURSEFORGE_API_TOKEN specified"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue