Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
WessTorn authored Dec 15, 2024
1 parent 518b0a2 commit ed0b211
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Checkout repository
Expand All @@ -24,8 +24,28 @@ jobs:
with:
version: '1.9.x'

- name: Setup latest ReAPI includes
env:
REPO: "rehlds/reapi"
run: |
mkdir -p dep/reapi
cd dep/reapi
curl \
--silent \
https://api.github.com/repos/$REPO/releases/latest | \
grep "browser_download_url" | \
grep -Eo 'https://[^\"]*' | \
xargs wget
7z x *.zip
echo "REAPI_INCLUDE_PATH=$(pwd)/addons/amxmodx/scripting/include" >> $GITHUB_ENV
- name: Compile plugins
working-directory: scripting/
env:
REAPI_INCLUDE: ${{ env.REAPI_INCLUDE_PATH }}
run: |
compile() {
sourcefile=$1
Expand All @@ -35,11 +55,12 @@ jobs:
mkdir -p $(dirname $output_path)
echo -n "Compiling $sourcefile ... "
amxxpc "$sourcefile" -o"$output_path" -i"include" && echo "Done"
amxxpc "$sourcefile" -o"$output_path" -i"include" -i"$REAPI_INCLUDE" && echo "Done"
}
export -f compile
find . -type f -name "*.sma" -exec bash -c 'compile "$0"' {} \;
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit ed0b211

Please sign in to comment.