Update .gitlab-ci.yml file
This commit is contained in:
parent
b76f372b8c
commit
2f60079490
1 changed files with 32 additions and 0 deletions
32
.gitlab-ci.yml
Normal file
32
.gitlab-ci.yml
Normal 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
|
Loading…
Reference in a new issue