2021-11-10 17:21:52 +01:00
|
|
|
image: gradle:jdk17
|
2020-07-10 20:50:50 +02:00
|
|
|
|
|
|
|
variables:
|
|
|
|
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- export GRADLE_USER_HOME=`pwd`/.gradle
|
|
|
|
|
2021-11-10 17:21:52 +01:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- deploy
|
|
|
|
|
2021-02-22 08:55:23 +01:00
|
|
|
build_test:
|
2021-11-10 17:21:52 +01:00
|
|
|
stage: build
|
2021-02-22 08:55:23 +01:00
|
|
|
script:
|
2021-11-10 17:21:52 +01:00
|
|
|
- gradle --build-cache build
|
2021-02-22 08:55:23 +01:00
|
|
|
- cp build/libs/* ./
|
2021-11-10 17:21:52 +01:00
|
|
|
- mv *-dev.jar dev.zip
|
2021-02-22 08:55:23 +01:00
|
|
|
- mv *.jar latest.jar
|
2021-11-10 17:21:52 +01:00
|
|
|
- mv dev.zip latest-dev.jar
|
2020-07-10 20:50:50 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- build/libs
|
2021-02-22 08:55:23 +01:00
|
|
|
- latest.jar
|
2021-11-10 17:21:52 +01:00
|
|
|
- latest-dev.jar
|
2021-02-22 08:55:23 +01:00
|
|
|
|
|
|
|
deploy:
|
2021-11-10 17:21:52 +01:00
|
|
|
rules:
|
|
|
|
- if: $CI_COMMIT_TAG && '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^master/'
|
2021-02-22 08:55:23 +01:00
|
|
|
stage: deploy
|
|
|
|
script:
|
2021-11-10 17:21:52 +01:00
|
|
|
- gradle --build-cache build curseforge modrinth
|