Skip to content

Update movementapi include #621

Update movementapi include

Update movementapi include #621

Workflow file for this run

name: CI
env:
SM_VERSION: "1.12"
GOKZ_VERSION: ""
on:
push:
branches: [ master, dev ]
tags: [ '*' ]
pull_request:
branches: [ master, dev ]
# Allows this workflow to be run manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
# Checks-out the repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: version
run: |
VERSION=$(grep -oP '(?<=#define GOKZ_VERSION ")[^"]+' addons/sourcemod/scripting/include/gokz/version.inc)
if [ -z "$VERSION" ]; then
echo "Could not parse version from version.inc" >&2
exit 1
fi
echo "GOKZ_VERSION=${VERSION}" >> $GITHUB_ENV
- name: compile
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y wget libc6:i386 lib32stdc++6 zip
mkdir sm
cd sm
wget -q -O - "http://sourcemod.net/latest.php?os=linux&version=${{env.SM_VERSION}}" | tar x -zf -
cp -r ../addons .
cd ./addons/sourcemod/scripting
for file in gokz-*.sp; do ./spcomp $file; done;
cd ../../../../
mkdir -p addons/sourcemod/plugins
mv sm/addons/sourcemod/scripting/gokz-*.smx addons/sourcemod/plugins
- name: upload-full
uses: actions/upload-artifact@v7
with:
name: GOKZ-v${{ env.GOKZ_VERSION }}
path: |
.
!sm*
!*.md
!.github*
!.git*
!LICENSE
!addons/sourcemod/scripting*
!*.zip
!*.fgd
- name: upload-upgrade
uses: actions/upload-artifact@v7
with:
name: GOKZ-v${{ env.GOKZ_VERSION }}-upgrade
path: |
.
!sm*
!*.md
!.github*
!.git*
!LICENSE
!addons/sourcemod/scripting*
!cfg*
!*.zip
!*.fgd
- name: Create release archives
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
run: |
rsync -a \
--exclude='sm' --exclude='*.md' --exclude='.github' --exclude='.git' \
--exclude='LICENSE' --exclude='addons/sourcemod/scripting' \
--exclude='*.zip' --exclude='*.fgd' \
. /tmp/gokz-full/
rsync -a \
--exclude='sm' --exclude='*.md' --exclude='.github' --exclude='.git' \
--exclude='LICENSE' --exclude='addons/sourcemod/scripting' \
--exclude='cfg' --exclude='*.zip' --exclude='*.fgd' \
. /tmp/gokz-upgrade/
cd /tmp/gokz-full && zip -r $GITHUB_WORKSPACE/GOKZ-v${{ env.GOKZ_VERSION }}.zip .
cd /tmp/gokz-upgrade && zip -r $GITHUB_WORKSPACE/GOKZ-v${{ env.GOKZ_VERSION }}-upgrade.zip .
- name: Create tag and release
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ env.GOKZ_VERSION }} \
--title "GOKZ v${{ env.GOKZ_VERSION }}" \
--generate-notes \
GOKZ-v${{ env.GOKZ_VERSION }}.zip \
GOKZ-v${{ env.GOKZ_VERSION }}-upgrade.zip