-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
46 lines (40 loc) · 845 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
variables:
CACHE_DIR: "$CI_PROJECT_DIR/build"
CACHE_DIR2: "$CI_PROJECT_DIR/.gradle"
ORIG_ARTIFACTS: "$CI_PROJECT_DIR/build/libs/SpacePackExtended-*.jar"
ARTIFACTS: "$CI_PROJECT_DIR/SpacePackExtended-*.jar"
cache:
paths:
- $CACHE_DIR
- $CACHE_DIR2
key: "$CI_BUILD_REF_NAME"
untracked: false
stages:
- build
- deploy
- cleanup
build:
stage: build
script:
- ./gradlew clean
- ./gradlew assemble
- cp $ORIG_ARTIFACTS .
when: on_success
artifacts:
name: "SpacePackExtended-$(cat $CACHE_DIR/.version)"
paths:
- $ARTIFACTS
deploy:
stage: deploy
script:
- ./gradlew uploadArchives curseforge -PcurseForgeApiKey=$curseForgeApiKey
when: on_success
only:
- tags
cleanup:
stage: cleanup
script:
- ./gradlew clean
- rm -vf $ARTIFACTS
- mkdir -p $CACHE_DIR $CACHE_DIR2
when: always