import
This commit is contained in:
36
lain/.github/workflows/main.yml
vendored
Normal file
36
lain/.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Lain
|
||||
|
||||
on: [push]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
linting:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Luacheck linter
|
||||
uses: lunarmodules/luacheck@v0
|
||||
|
||||
rockspec:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: leafo/gh-actions-lua@v9
|
||||
- uses: leafo/gh-actions-luarocks@v4
|
||||
|
||||
- name: Update Rockspec
|
||||
shell: bash
|
||||
env:
|
||||
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
|
||||
run: |
|
||||
if [[ $(git diff *.rockspec | grep "+version") ]]
|
||||
then
|
||||
echo "Rockspec changed, uploading to LuaRocks.org"
|
||||
luarocks upload *.rockspec --api-key "$LUAROCKS_API_KEY"
|
||||
else
|
||||
echo "Rockspec unchanged, nothing to do"
|
||||
fi
|
||||
Reference in New Issue
Block a user