Update .gitlab-ci.yml file

This commit is contained in:
Kewbit 2024-11-17 16:38:42 +00:00
parent b76f372b8c
commit 2f60079490

32
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,32 @@
stages:
- build
- release
variables:
GRADLE_USER_HOME: "$CI_PROJECT_DIR/.gradle"
build:
stage: build
image: gradle:jdk21 # Use the specific Docker image for this job
script:
- echo "Building with Gradle on Java 21:"
- java -version
- ./gradlew :daemon-all shadowJar
artifacts:
paths:
- build/libs/
expire_in: 7 days
release:
stage: release
image: alpine:latest # Use a minimal image for release preparation
script:
- mkdir -p release
- cp build/libs/*.jar release/
- echo "Release artifact generated."
artifacts:
paths:
- release/
expire_in: 7 days
only:
- tags