34 lines
730 B
YAML
34 lines
730 B
YAML
image: gradle:jdk16
|
|
|
|
variables:
|
|
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
|
|
|
before_script:
|
|
- export GRADLE_USER_HOME=`pwd`/.gradle
|
|
|
|
stages:
|
|
- build
|
|
- deploy
|
|
|
|
build_test:
|
|
stage: build
|
|
script:
|
|
- gradle --build-cache build publish -PpublicMaven -Ppipeline=$CI_PIPELINE_ID
|
|
- cp build/libs/* ./
|
|
- rm *-maven.jar *-sources.jar *-sources-dev.jar
|
|
- mv *-dev.jar dev.zip
|
|
- mv *.jar latest.jar
|
|
- mv dev.zip latest-dev.jar
|
|
artifacts:
|
|
paths:
|
|
- build/libs
|
|
- latest.jar
|
|
- latest-dev.jar
|
|
|
|
deploy:
|
|
rules:
|
|
- if: $CI_COMMIT_TAG && '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^master/'
|
|
stage: deploy
|
|
script:
|
|
- gradle --build-cache build publish modrinth curseforge -PpublicMaven
|