prepare for automated develop deployment [skip ci]

This commit is contained in:
techbot 2023-09-19 19:16:27 +02:00
parent 5ba3b262b1
commit 3aadf5df83
4 changed files with 74 additions and 22 deletions

24
.github/workflows/lua_linter.yaml vendored Normal file
View File

@ -0,0 +1,24 @@
name: lint
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_call:
jobs:
lua-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: GLua Linter
uses: TASSIA710/action-glua-lint@v1.1.4
with:
lint_maxScopeDepth: 0
lint_deprecated: false
lint_emptyBlocks: false
lint_unusedParameters: false
lint_unusedLoopVars: false
lint_shadowing: false
lint_inconsistentVariableStyle: false

View File

@ -0,0 +1,29 @@
name: update_workshop_develop
on:
push:
branches:
- develop
jobs:
linter:
uses: CapsAdmin/pac3/.github/workflows/lua_linter.yaml@develop
update-workshop-develop:
if: github.repository == 'CapsAdmin/pac3/'
needs: linter
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Rename addon.json
run: mv addon_develop.json addon.json
- name: Publish to Steam Workshop
uses: Earu/GSW-action@V2.1
with:
account-name: ${{secrets.STEAM_NAME}}
account-password: ${{secrets.STEAM_PASSWORD}}
workshop-id: '3038093543'
addon-path: ${{env.GITHUB_WORKSPACE}}

View File

@ -1,22 +0,0 @@
sudo: false
language: c
addons:
apt:
packages:
- libc6:i386
- libstdc++6:i386
before_install:
# Download the lua
- wget https://github.com/Metastruct/gtravis/releases/download/travisbins/gluac.tar.xz
- tar -xf gluac.tar.xz
- export LD_LIBRARY_PATH=`pwd`/gluac${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH:-}
# Set the $PATH so gluac can be executed
- export PATH=$PATH:`pwd`/gluac
- echo $PWD
script: find lua/ -iname '*.lua' -not -path 'lua/entities/gmod_wire_expression2/core/custom/*' -print0 | xargs -0 -- gluac -p --

21
addon_develop.json Normal file
View File

@ -0,0 +1,21 @@
{
"title" : "PAC3 [develop version]",
"type" : "tool",
"tags" : [ "fun", "roleplay" ],
"ignore" :
[
".gitignore",
".editorconfig",
".git*",
".vscode/*",
"*.txt",
"*.md",
"*.bat",
"*.sh",
"icon.jpg",
"*.7z",
"*.md",
"*.yml",
"COPYING"
]
}