alpha
Login
or
Join now
sickday.tngl.sh
/
hla-client
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
A RuneTek3 client (377) that is deobfuscated, converted to Kotlin, and includes QoL improvements.
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
feat: update workflow, add scripts
author
Patrick W.
date
7 hours ago
(Jun 25, 2026, 9:42 AM -0400)
commit
16c64599
16c645998774653e96fc16634f28b670c381226c
parent
f58091e1
f58091e15c336c904371a1719f3471c7048cdd84
-173
1 changed file
Expand all
Collapse all
Unified
Split
.gitlab-ci.yml
-173
.gitlab-ci.yml
Reviewed
···
1
1
-
stages:
2
2
-
- build
3
3
-
- publish
4
4
-
5
5
-
variables:
6
6
-
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
7
7
-
PACKAGE_NAME: "hla-client"
8
8
-
JAR_NAME: "377.jar"
9
9
-
# Server connection defaults (same across regions)
10
10
-
GAME_PORT: "43594"
11
11
-
ONDEMAND_PORT: "43594"
12
12
-
JAGGRAB_PORT: "43595"
13
13
-
HTTP_PORT: "8080"
14
14
-
RSA_PUB: "65537"
15
15
-
16
16
-
# Per-region build. Each matrix row produces hla-<REGION>-client.zip with the
17
17
-
# correct server host + RSA modulus baked into config/client-config.yaml.
18
18
-
#
19
19
-
# CI/CD variables required (set in Settings → CI/CD → Variables, regular type):
20
20
-
# HLA_HOST_USE # e.g. use.objects.pw
21
21
-
# HLA_HOST_USW # e.g. usw.objects.pw
22
22
-
# HLA_RSA_MODULUS_USE # decimal modulus from rsa.yml on use.objects.pw
23
23
-
# HLA_RSA_MODULUS_USW # decimal modulus from rsa.yml on usw.objects.pw
24
24
-
#
25
25
-
# To add a region: append a row to the matrix below and add HLA_HOST_<X> +
26
26
-
# HLA_RSA_MODULUS_<X> variables. Modulus values are public (anyone connecting
27
27
-
# sees them) so they don't need to be masked.
28
28
-
build:
29
29
-
stage: build
30
30
-
image: eclipse-temurin:21-jdk-alpine
31
31
-
tags:
32
32
-
- docker
33
33
-
parallel:
34
34
-
matrix:
35
35
-
- REGION: "us-east"
36
36
-
- REGION: "us-west"
37
37
-
before_script:
38
38
-
- apk add --no-cache zip
39
39
-
- chmod +x gradlew
40
40
-
script:
41
41
-
# Resolve region-specific values from CI variables
42
42
-
- |
43
43
-
case "$REGION" in
44
44
-
us-east)
45
45
-
HOST="${HLA_HOST_USE:?HLA_HOST_USE not set in CI vars}"
46
46
-
MODULUS="${HLA_RSA_MODULUS_USE:?HLA_RSA_MODULUS_USE not set in CI vars}"
47
47
-
;;
48
48
-
us-west)
49
49
-
HOST="${HLA_HOST_USW:?HLA_HOST_USW not set in CI vars}"
50
50
-
MODULUS="${HLA_RSA_MODULUS_USW:?HLA_RSA_MODULUS_USW not set in CI vars}"
51
51
-
;;
52
52
-
*)
53
53
-
echo "Unknown region: $REGION" >&2
54
54
-
exit 1
55
55
-
;;
56
56
-
esac
57
57
-
export HOST MODULUS
58
58
-
59
59
-
- export ZIP_NAME="hla-${REGION}-client.zip"
60
60
-
- echo "Building ${ZIP_NAME} for ${HOST} (modulus ${MODULUS:0:16}…)"
61
61
-
62
62
-
# Build the fat jar (same for all regions)
63
63
-
- ./gradlew clean jar
64
64
-
65
65
-
# Stage the dist directory
66
66
-
- mkdir -p dist/config
67
67
-
- cp build/libs/${JAR_NAME} dist/
68
68
-
69
69
-
# Generate region-specific client-config.yaml
70
70
-
- |
71
71
-
cat > dist/config/client-config.yaml <<EOF
72
72
-
# Generated by CI for region: ${REGION}
73
73
-
# Server: ${HOST}
74
74
-
# Build: ${CI_COMMIT_SHORT_SHA}
75
75
-
net:
76
76
-
address: ${HOST}
77
77
-
game_port: ${GAME_PORT}
78
78
-
ondemand_port: ${ONDEMAND_PORT}
79
79
-
jaggrab_port: ${JAGGRAB_PORT}
80
80
-
http_port: ${HTTP_PORT}
81
81
-
cache:
82
82
-
cacheDir: ./.377
83
83
-
jaggrabEnabled: true
84
84
-
rsa:
85
85
-
rsaEnabled: true
86
86
-
rsaPub: ${RSA_PUB}
87
87
-
rsaModulus: ${MODULUS}
88
88
-
login:
89
89
-
useStaticCredentials: false
90
90
-
username: ""
91
91
-
password: ""
92
92
-
game:
93
93
-
roofsEnabled: true
94
94
-
freeTeleports: false
95
95
-
debugContext: false
96
96
-
EOF
97
97
-
98
98
-
# Launchers (matches the previous CI's behavior)
99
99
-
- echo '#!/bin/sh' > dist/run.sh
100
100
-
- echo 'cd "$(dirname "$0")" && java -jar 377.jar' >> dist/run.sh
101
101
-
- chmod +x dist/run.sh
102
102
-
- cp dist/run.sh dist/run.command
103
103
-
- chmod +x dist/run.command
104
104
-
- printf '@echo off\r\ncd /d "%%~dp0"\r\njava -jar 377.jar\r\npause\r\n' > dist/run.bat
105
105
-
106
106
-
# Bundle
107
107
-
- cd dist && zip -r "../${ZIP_NAME}" ${JAR_NAME} config/ run.sh run.command run.bat
108
108
-
artifacts:
109
109
-
paths:
110
110
-
- "hla-${REGION}-client.zip"
111
111
-
expire_in: 90 days
112
112
-
cache:
113
113
-
key:
114
114
-
files:
115
115
-
- build.gradle
116
116
-
paths:
117
117
-
- .gradle/
118
118
-
119
119
-
publish:
120
120
-
stage: publish
121
121
-
image: alpine:latest
122
122
-
tags:
123
123
-
- docker
124
124
-
parallel:
125
125
-
matrix:
126
126
-
- REGION: "us-east"
127
127
-
- REGION: "us-west"
128
128
-
# Both build and publish use identical parallel:matrix definitions, so GitLab
129
129
-
# auto-pairs them. Listing `job: build` without an explicit matrix downloads
130
130
-
# all parallel build artifacts (a few MB of waste — negligible). Each publish
131
131
-
# job uses its own REGION to pick its zip from the bundle.
132
132
-
needs:
133
133
-
- job: build
134
134
-
artifacts: true
135
135
-
rules:
136
136
-
- if: $CI_COMMIT_BRANCH == "main"
137
137
-
before_script:
138
138
-
- apk add --no-cache curl jq
139
139
-
# GitLab generic packages append on duplicate uploads (every push leaves an
140
140
-
# extra copy in the registry). Workflow: find any existing files in
141
141
-
# ${PACKAGE_NAME}/latest matching this region's zip name, DELETE them, then
142
142
-
# upload fresh. Each parallel job only touches its own ZIP_NAME so the two
143
143
-
# regions don't race.
144
144
-
script:
145
145
-
- export ZIP_NAME="hla-${REGION}-client.zip"
146
146
-
- echo "Publishing ${ZIP_NAME} @ ${CI_COMMIT_SHORT_SHA}"
147
147
-
148
148
-
# Find package id for hla-client/latest (empty string if first publish)
149
149
-
- |
150
150
-
PACKAGE_ID=$(curl --silent --fail --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \
151
151
-
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages?package_name=${PACKAGE_NAME}&package_version=latest" \
152
152
-
| jq -r '.[0].id // empty')
153
153
-
echo "Existing package id: '${PACKAGE_ID:-<none>}'"
154
154
-
155
155
-
# Delete prior copies of THIS zip name only (preserves other regions' zips)
156
156
-
- |
157
157
-
if [ -n "${PACKAGE_ID}" ]; then
158
158
-
FILE_IDS=$(curl --silent --fail --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \
159
159
-
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/${PACKAGE_ID}/package_files" \
160
160
-
| jq -r --arg name "${ZIP_NAME}" '.[] | select(.file_name == $name) | .id')
161
161
-
for fid in ${FILE_IDS}; do
162
162
-
echo "Deleting stale file id ${fid} (${ZIP_NAME})"
163
163
-
curl --silent --fail --request DELETE \
164
164
-
--header "JOB-TOKEN: ${CI_JOB_TOKEN}" \
165
165
-
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/${PACKAGE_ID}/package_files/${fid}"
166
166
-
done
167
167
-
fi
168
168
-
169
169
-
# Upload the new zip
170
170
-
- |
171
171
-
curl --fail --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \
172
172
-
--upload-file "${ZIP_NAME}" \
173
173
-
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/latest/${ZIP_NAME}"