Skip to content

Update replay-stocks.sp #121

Update replay-stocks.sp

Update replay-stocks.sp #121

Workflow file for this run

name: Compile
on: [push, pull_request, workflow_dispatch]
jobs:
compile:
runs-on: ubuntu-latest
strategy:
matrix:
sm-version: [ '1.11' ] #, '1.12'
name: "Build SM ${{ matrix.sm-version }}"
steps:
- name: Prepare env
shell: bash
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Setup SP
uses: rumblefrog/setup-sp@master
with:
version: ${{ matrix.sm-version }}
- name: Download and extract dependencies
shell: bash
run: |
# Mac zip just because it's smaller & we don't repack the extensions...
wget https://github.com/ErikMinekus/sm-ripext/releases/download/1.3.1/sm-ripext-1.3.1-mac.zip
unzip sm-ripext-1.3.1-mac.zip "addons/sourcemod/scripting/include/*"
wget https://github.com/clugg/sm-json/archive/refs/tags/v5.0.0.tar.gz
tar --strip-components=1 -xvzf v5.0.0.tar.gz sm-json-5.0.0/addons/sourcemod/scripting/include
wget https://github.com/hermansimensen/eventqueue-fix/archive/refs/tags/1.3.2.tar.gz
tar --strip-components=1 -xvzf 1.3.2.tar.gz -C addons/sourcemod
rm -rf *.zip *.tar.gz addons/sourcemod/.git* addons/sourcemod/LICENSE
- name: Run compiler
shell: bash
run: |
cd addons/sourcemod
mkdir plugins
for src in $(find scripting -maxdepth 1 -type f -name "*.sp");
do
spcomp $src -o=plugins/$(basename $src .sp)'.smx' -i=scripting/include -v2
done
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bhoptimer-${{ github.head_ref || github.ref_name }}-sm${{ matrix.sm-version }}-${{ env.GITHUB_SHA_SHORT }}
path: |
addons
materials
sound
CHANGELOG.md
LICENSE
README.md
retention-days: 14
release:
name: Release
if: github.ref_type == 'tag'
needs: compile
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Archive artifacts
shell: bash
run: find * -maxdepth 0 -type d -exec zip -rq {}.zip {} \;
- uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
name: ${{ github.ref_name }}
artifacts: "*.zip"