From badf81c806e8a19f474c1dd5adcbafc575574ca1 Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Wed, 21 Dec 2022 10:49:54 +0100 Subject: [PATCH] Create minify.yml --- .github/workflows/minify.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/minify.yml diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml new file mode 100644 index 0000000..42a87fe --- /dev/null +++ b/.github/workflows/minify.yml @@ -0,0 +1,30 @@ +name: Minify Scripts + +on: + push: + branches: [ "main" ] + + 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: Install Minifier + run: wget https://raw.githubusercontent.com/stravant/lua-minify/master/minify.lua minify.lua + + - name: Minify Movescript + run: lua minify.lua src/movescript.lua > min/movescript.lua + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4