Skip to content

Commit 10ad72b

Browse files
committed
yeah
1 parent 0d53e91 commit 10ad72b

File tree

4 files changed

+86
-53
lines changed

4 files changed

+86
-53
lines changed

.github/workflows/ci.yml

Lines changed: 82 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -23,48 +23,33 @@ permissions:
2323
statuses: write
2424

2525
jobs:
26-
linter:
27-
runs-on: ubuntu-latest
28-
steps:
29-
- uses: actions/checkout@v3
30-
- uses: leafo/gh-actions-lua@v8.0.0
31-
with:
32-
luaVersion: "5.2"
33-
- uses: leafo/gh-actions-luarocks@v4.0.0
34-
- run: |
35-
luarocks install luafilesystem
36-
luarocks install argparse
37-
- uses: actions/checkout@v3
38-
with:
39-
repository: LiliaFramework/GluaCheck
40-
path: luacheck
41-
- run: |
42-
cd luacheck
43-
luarocks make
44-
- run: |
45-
luacheck gamemode \
46-
--no-global \
47-
--no-max-line-length \
48-
--no-self \
49-
--no-max-code-line-length \
50-
--no-max-string-line-length \
51-
--no-max-comment-line-length \
52-
--no-max-cyclomatic-complexity
53-
5426
strip-comments:
55-
needs: linter
5627
runs-on: ubuntu-latest
5728
steps:
5829
- uses: actions/checkout@v3
5930
- run: |
6031
curl -sSfL https://raw.githubusercontent.com/bleonheart/Useful-Python-Scripts/refs/heads/main/files/remove_lua_comments.py -o remove_lua_comments.py || curl -sSfL https://raw.githubusercontent.com/bleonheart/Useful-Python-Scripts/main/files/remove_lua_comments.py -o remove_lua_comments.py
6132
python3 remove_lua_comments.py gamemode
33+
tar --exclude=.git -cf workspace.tar .
34+
- uses: actions/upload-artifact@v4
35+
with:
36+
name: workspace
37+
path: workspace.tar
38+
overwrite: true
39+
retention-days: 1
6240

6341
format-glua:
6442
needs: strip-comments
6543
runs-on: ubuntu-latest
6644
steps:
6745
- uses: actions/checkout@v3
46+
- uses: actions/download-artifact@v4
47+
with:
48+
name: workspace
49+
path: .
50+
- run: |
51+
tar -xf workspace.tar
52+
rm -f workspace.tar
6853
- name: Download glualint binary
6954
env:
7055
GLUALINT_VERSION: "1.29.0"
@@ -87,15 +72,58 @@ jobs:
8772
- name: Pretty-print all Lua files
8873
run: |
8974
find . -type f -name "*.lua" -print0 | xargs -0 ./glualint --pretty-print-files
90-
- name: Commit changes
91-
run: |
92-
if [ -n "$(git status --porcelain)" ]; then
93-
git config user.name "github-actions[bot]"
94-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
95-
git add .
96-
git commit -m "chore: auto-format all GLua files"
97-
git push
98-
fi
75+
tar --exclude=.git -cf workspace.tar .
76+
- uses: actions/upload-artifact@v4
77+
with:
78+
name: workspace
79+
path: workspace.tar
80+
overwrite: true
81+
retention-days: 1
82+
83+
linter:
84+
needs: format-glua
85+
runs-on: ubuntu-latest
86+
steps:
87+
- uses: actions/checkout@v3
88+
- uses: actions/download-artifact@v4
89+
with:
90+
name: workspace
91+
path: .
92+
- run: |
93+
tar -xf workspace.tar
94+
rm -f workspace.tar
95+
- uses: leafo/gh-actions-lua@v8.0.0
96+
with:
97+
luaVersion: "5.2"
98+
- uses: leafo/gh-actions-luarocks@v4.0.0
99+
- run: |
100+
luarocks install luafilesystem
101+
luarocks install argparse
102+
- uses: actions/checkout@v3
103+
with:
104+
repository: LiliaFramework/GluaCheck
105+
path: luacheck
106+
- run: |
107+
cd luacheck
108+
luarocks make
109+
- run: |
110+
luacheck gamemode \
111+
--no-global \
112+
--no-max-line-length \
113+
--no-self \
114+
--no-max-code-line-length \
115+
--no-max-string-line-length \
116+
--no-max-comment-line-length \
117+
--no-max-cyclomatic-complexity
118+
- run: |
119+
cd "${GITHUB_WORKSPACE}"
120+
tar --exclude=.git -cf workspace.tar .
121+
- uses: actions/upload-artifact@v4
122+
with:
123+
name: workspace
124+
path: workspace.tar
125+
overwrite: true
126+
retention-days: 1
99127

100128
compute-version:
101129
if: github.repository == 'LiliaFramework/Lilia'
@@ -134,6 +162,13 @@ jobs:
134162
- uses: actions/checkout@v3
135163
with:
136164
fetch-depth: 0
165+
- uses: actions/download-artifact@v4
166+
with:
167+
name: workspace
168+
path: .
169+
- run: |
170+
tar -xf workspace.tar
171+
rm -f workspace.tar
137172
- run: |
138173
python3 - << 'PY'
139174
import os, re, pathlib, sys
@@ -158,17 +193,17 @@ jobs:
158193
mkdir -p documentation/docs/versioning
159194
echo "{\"version\":\"${VERSION}\"}" > documentation/docs/versioning/lilia.json
160195
- run: |
161-
git config user.name github-actions[bot]
162-
git config user.email github-actions[bot]@users.noreply.github.com
163-
git add gamemode/shared.lua documentation/docs/versioning/lilia.json
164-
git diff-index --quiet HEAD || git commit -m "Successfully updated workshop Lilia to ${VERSION}"
165-
git push origin HEAD:main
196+
git config user.name "github-actions[bot]"
197+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
198+
git add -A
199+
if ! git diff --cached --quiet; then
200+
git commit -m "chore: Successfully updated workshop Lilia to ${VERSION}"
201+
git push origin HEAD:main
202+
fi
166203
167204
release:
168205
if: github.repository == 'LiliaFramework/Lilia' && github.ref == 'refs/heads/main'
169-
needs:
170-
- compute-version
171-
- update-shared-version
206+
needs: update-shared-version
172207
runs-on: ubuntu-latest
173208
env:
174209
VERSION: ${{ needs.compute-version.outputs.version }}
@@ -283,9 +318,7 @@ jobs:
283318
284319
deploy-pages:
285320
if: github.repository == 'LiliaFramework/Lilia' && github.ref == 'refs/heads/main'
286-
needs:
287-
- compute-version
288-
- release
321+
needs: release
289322
runs-on: ubuntu-latest
290323
env:
291324
VERSION: ${{ needs.compute-version.outputs.version }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"6.492"}
1+
{"version":"6.467"}

gamemode/modules/attributes/libraries/server.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,4 @@ net.Receive("ChangeAttribute", function(_, client)
156156
else
157157
client:notifyLocalized("invalidMode")
158158
end
159-
end)
159+
end)

gamemode/shared.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
GM.Name = "Lilia"
2-
GM.version = 6.492
1+
GM.Name = "Lilia"
2+
GM.version = 7.732
33
GM.Author = "Samael"
44
GM.Website = "https://discord.gg/esCRH5ckbQ"
55
include("core/libraries/loader.lua")

0 commit comments

Comments
 (0)