-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
131 lines (116 loc) · 3.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
image: registry.gitlab.com/legionarius/template/godot-docker:latest
# Cache imported assets between runs
cache:
key: import-assets
paths:
- .import/
stages:
- export
- deploy
variables:
EXPORT_NAME: puppets_runner
VERSION: $(git describe --tags)
linux:
stage: export
script:
- scons platform=linux target=release use_llvm=yes
- mkdir -v -p build/linux
- godot -v --export "Linux/X11" build/linux/$EXPORT_NAME.x86_64
artifacts:
name: $EXPORT_NAME-$CI_JOB_NAME
paths:
- build/linux
expire_in: 2 days
windows:
stage: export
script:
- scons platform=windows target=release
- mkdir -v -p build/windows
- godot -v --export "Windows Desktop" build/windows/$EXPORT_NAME.exe
artifacts:
name: $EXPORT_NAME-$CI_JOB_NAME
paths:
- build/windows
expire_in: 2 days
mac:
stage: export
when: manual
script:
- scons platform=osx target=release
- mkdir -v -p build/mac
- godot -v --export "Mac OSX" build/mac/$EXPORT_NAME.zip
artifacts:
name: $EXPORT_NAME-$CI_JOB_NAME
paths:
- build/mac
expire_in: 2 days
html5:
stage: export
script:
- scons platform=javascript target=release
- mkdir -v -p build/html5
- godot -v --export "HTML5" build/html5/index.html
artifacts:
name: $EXPORT_NAME-web
paths:
- build/html5
expire_in: 2 days
pages:
stage: deploy
when: manual
script:
- mkdir public
- cp build/html5/* public
artifacts:
paths:
- public
expire_in: 1 week
android:
stage: export
script:
- echo -n $KEYSTORE_FILE | base64 -d > /root/release.jks
- sed -i "/keystore\/release=\"\"/ c\keystore\/release=\"/root/release.jks\"" export_presets.cfg
- sed -i "/keystore\/release_password=\"\"/ c\keystore\/release_password=\"$KEYSTORE_PASSWORD\"" export_presets.cfg
- sed -i "/keystore\/release_user=\"\"/ c\keystore\/release_user=\"$KEYSTORE_ALIAS\"" export_presets.cfg
- scons platform=android target=release android_arch=arm64v8
- scons platform=android target=release
- mkdir -v -p build/android
- godot -v --export "Android" build/android/$EXPORT_NAME.apk
artifacts:
name: $EXPORT_NAME-android
paths:
- build/android
expire_in: 2 days
# Itch.io Deploy
itchio:linux:
stage: deploy
only:
- /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/
script:
- butler push ./build/linux $ITCHIO_USERNAME/$ITCHIO_GAME:linux --userversion=$CI_COMMIT_TAG
dependencies:
- linux
itchio:windows:
stage: deploy
only:
- /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/
script:
- butler push ./build/windows $ITCHIO_USERNAME/$ITCHIO_GAME:windows --userversion=$CI_COMMIT_TAG
dependencies:
- windows
itchio:macosx:
stage: deploy
only:
- /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/
script:
- butler push ./build/mac $ITCHIO_USERNAME/$ITCHIO_GAME:mac --userversion=$CI_COMMIT_TAG
dependencies:
- mac
itchio:android:
stage: deploy
only:
- /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/
script:
- butler push ./build/android $ITCHIO_USERNAME/$ITCHIO_GAME:android --userversion=$CI_COMMIT_TAG
dependencies:
- android