Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Alienmario committed Jul 20, 2024
1 parent 5ca51cc commit f3ca920
Show file tree
Hide file tree
Showing 5 changed files with 1,734 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on: [push, pull_request, workflow_dispatch]

jobs:
build:
name: "Build"
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup sourcemod compiler
id: setup-sp
uses: rumblefrog/setup-sp@master
with:
version: '1.12.7031'

- name: Compile plugins
run: |
mkdir -p plugins
for file in scripting/*.sp
do
plugin="$(basename "${file%.*}")"
echo -e "\nCompiling $plugin\n"
spcomp -v2 -i scripting/include -o plugins/"$plugin" "$file"
done
- name: Create package
run: |
OUT="/tmp/build"
SM="${OUT}/addons/sourcemod"
mkdir -p $SM
cp -R plugins $SM
cp -R scripting $SM
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: sfdlr-${{ github.run_number }}
path: /tmp/build/
Loading

0 comments on commit f3ca920

Please sign in to comment.