-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
52 lines (46 loc) · 1.13 KB
/
.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
47
48
49
50
51
52
variables:
GIT_SUBMODULE_STRATEGY: recursive
ORIG_ARTIFACTS: "$CI_PROJECT_DIR/**/build/libs/*.jar*"
ARTIFACTS: "$CI_PROJECT_DIR/*.jar*"
GRADLE_OPTS: >
-Dorg.gradle.project.branchName="$CI_COMMIT_REF_NAME"
-Dorg.gradle.project.curseForgeApiKey="$curseForgeApiKey"
-Dorg.gradle.project.keyStoreAlias="$keyStoreAlias"
-Dorg.gradle.project.keyStore="$keyStore"
-Dorg.gradle.project.keyStorePass="$keyStorePass"
cache:
key: "$CI_COMMIT_REF_NAME_$CI_COMMIT_SHA"
untracked: true
before_script:
- shopt -s globstar
- shopt -s nullglob
stages:
- build
- test
- deploy
build:
stage: build
script:
- ./gradlew --console=plain en2ud assemble
- cp $ORIG_ARTIFACTS .
when: on_success
artifacts:
paths:
- $ARTIFACTS
checkTranslations:
stage: test
script:
- ./gradlew --continue --console=plain checkTranslations
- if test -n "$(find . -maxdepth 1 -name '*.lang.txt' -print -quit)"; then
- tail -vn+1 *.lang.txt
- exit 1
- fi
when: on_success
allow_failure: true
deploy:
stage: deploy
script:
- ./gradlew --console=plain uploadArchives curseforge
when: on_success
only:
- tags