Update minify workflow to output Lua files to the release directory
This commit is contained in:
7
.github/workflows/minify.yml
vendored
7
.github/workflows/minify.yml
vendored
@@ -30,19 +30,18 @@ jobs:
|
|||||||
|
|
||||||
- name: Minify Lua files
|
- name: Minify Lua files
|
||||||
run: |
|
run: |
|
||||||
mkdir minified || true
|
echo "local project = {}" > release/project.lua
|
||||||
echo "local project = {}" > minified/project.lua
|
|
||||||
for file in $(find . -name '*.lua'); do
|
for file in $(find . -name '*.lua'); do
|
||||||
minified_content=$(luamin -f $file)
|
minified_content=$(luamin -f $file)
|
||||||
filename=$(basename $file)
|
filename=$(basename $file)
|
||||||
echo "project[\"$filename\"] = function(...) $minified_content end" >> minified/project.lua
|
echo "project[\"$filename\"] = function(...) $minified_content end" >> release/project.lua
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Commit minified files
|
- name: Commit minified files
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name 'github-actions[bot]'
|
git config --global user.name 'github-actions[bot]'
|
||||||
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||||
git add minified/project.lua
|
git add release/project.lua
|
||||||
git commit -m 'Minify Lua files into a single project.lua'
|
git commit -m 'Minify Lua files into a single project.lua'
|
||||||
git push
|
git push
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user