From 2f6007949089a4b45b83c78ba3bd31af5ddf9580 Mon Sep 17 00:00:00 2001 From: Kewbit Date: Sun, 17 Nov 2024 16:38:42 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..63031ff0 --- /dev/null +++ b/.gitlab-ci.yml @@ -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