forked from GregTechCE/GregTech
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
44 lines (39 loc) · 989 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
image: anapsix/alpine-java:8_jdk
before_script:
- which java
- which javac
stages:
- init
- build
- deploy
increment_build_number:
stage: init
variables:
VAR_NAME: BUILD_NUMBER
TOKEN: ${CI_PIPELINE_IID_TOKEN}
GITLAB_URL: "https://gitlab.com"
before_script:
- apk add --update curl jq
script:
- "VAR=$(curl -s -f --header \"PRIVATE-TOKEN: ${TOKEN}\" \"${GITLAB_URL}/api/v4/projects/${CI_PROJECT_ID}/variables/${VAR_NAME}\" | jq -r '.value' ) "
- let VAR=VAR+1
- "curl -s -f --request PUT --header \"PRIVATE-TOKEN: ${TOKEN}\" \"${GITLAB_URL}/api/v4/projects/${CI_PROJECT_ID}/variables/${VAR_NAME}\" --form \"value=${VAR}\" "
only:
- master
build:
stage: build
before_script:
- ./gradlew setupCiWorkspace
- ./gradlew ciWriteBuildNumber
script:
- ./gradlew build
artifacts:
paths:
- build/libs/*.jar
expire_in: 1 month
production:
stage: deploy
script: ./gradlew curseforge
when: manual
only:
- master