40 lines
822 B
YAML
40 lines
822 B
YAML
name: Minify Scripts
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths:
|
|
- src/**
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Lua
|
|
uses: ljmf00/setup-lua@v1.0.0
|
|
with:
|
|
lua-version: 5.3
|
|
install-luarocks: true
|
|
|
|
- name: Minify Scripts
|
|
run: |
|
|
rm -rf min
|
|
mkdir min
|
|
lua minify.lua minify src/movescript.lua > min/movescript.lua
|
|
lua minify.lua minify src/itemscript.lua > min/itemscript.lua
|
|
|
|
- name: Clean Up Repository
|
|
run: |
|
|
rm -rf .lua
|
|
rm -rf .luarocks
|
|
rm -rf .source
|
|
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@v4
|