Skip to content

v9.6.0 Release

v9.6.0 Release #3

name: Upload artifacts
on:
release:
types: [published]
env:
DOTNET_VERSION: '8.x'
RUNTIME_VERSION: '8.0.11'
OPENMP_VERSION: '1.4.0.2779'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Download .NET Runtime
run: wget https://download.visualstudio.microsoft.com/download/pr/34670006-7e69-4750-9012-cf1e15bc83d1/c4c887089dbea784726b26facaae336a/dotnet-runtime-${{ env.RUNTIME_VERSION }}-win-x86.zip
- name: Unzip .NET Runtime
run: unzip dotnet-runtime-${{ env.RUNTIME_VERSION }}-win-x86.zip
- name: Download open.mp Server
run: wget https://github.com/openmultiplayer/open.mp/releases/download/v${{ env.OPENMP_VERSION }}/open.mp-win-x86.zip
- name: Unzip open.mp Server
run: unzip open.mp-win-x86.zip -d ctf-win
- name: Move contents of Server to root directory
run: |
mv ctf-win/Server/** ctf-win
rmdir ctf-win/Server
- name: Remove files
run: |
rm -rf ctf-win/gamemodes ctf-win/qawno
rmdir ctf-win/filterscripts ctf-win/models ctf-win/scriptfiles
rm -f ctf-win/config.json
- name: Publish the project to the bin directory
run: dotnet publish src/Host -c Release -o bin --framework=net8.0
- name: Create empty directories
run: |
mkdir ctf-win/gamemodes ctf-win/plugins
mkdir ctf-win/codepages ctf-win/filterscripts
mkdir ctf-win/runtime
- name: Copy artifacts
run: |
cp -r bin ctf-win
cp gamemodes/empty.amx ctf-win/gamemodes
cp plugins/*.dll ctf-win/plugins
cp codepages/*.txt ctf-win/codepages
cp filterscripts/*.amx ctf-win/filterscripts
cp -r scripts ctf-win
cp -r shared/Microsoft.NETCore.App/${{ env.RUNTIME_VERSION }}/** ctf-win/runtime
cp server.cfg.example ctf-win/server.cfg
- name: Replace .so with .dll in server.cfg
run: |
sed -i 's/libSampSharp.so/SampSharp.dll/' ctf-win/server.cfg
sed -i 's/streamer.so/streamer.dll/' ctf-win/server.cfg
- name: Create .env file
run: cp .env.example .env
- name: Copy .env file
run: cp .env ctf-win
- name: Create compressed file
run: zip -r ctf-win.zip ctf-win
- name: Upload artifacts to release
uses: softprops/action-gh-release@v2
with:
files: ctf-win.zip