CSDM Updates #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows Build CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
SOLUTION_FILE_PATH: . | |
BUILD_CONFIGURATION: Release | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Add MSBuild to PATH | |
uses: microsoft/[email protected] | |
- name: Restore NuGet packages | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: nuget restore ${{env.SOLUTION_FILE_PATH}} | |
- name: Run Build | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} | |
- name: Move release file to publish | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
# Make publish directory | |
mkdir publish\addons\csdm\dlls | |
# Move cstrike files to publish | |
move ${{env.SOLUTION_FILE_PATH}}\cstrike\* publish | |
# Move released dll to publish | |
move ${{env.BUILD_CONFIGURATION}}\*.dll publish\addons\csdm\dlls | |
- name: Download Metamod-r | |
run: | | |
# Set assets data | |
$assets = "https://github.com/theAsmodai/metamod-r/releases/download/1.3.0.138/metamod-bin-1.3.0.138.zip" | |
# Get ZIP file name | |
$zipName = "metamod-bin-1.3.0.138.zip" | |
# Download ZIP file | |
Invoke-WebRequest -Uri $assets -Out $zipName | |
# Extract ZIP File | |
Expand-Archive $zipName | |
# Get base name from ZIP file | |
$baseName = (Get-Item $zipName).BaseName | |
# DLL from path | |
$fromPath = ".\" + $baseName + "\addons\metamod\metamod.dll" | |
# DLL dest path | |
$DestPath = ".\publish\addons\metamod\metamod.dll" | |
# Copy item | |
Copy-Item -Path $fromPath -Destination $DestPath | |
- name: Download Hitbox Fixer | |
run: | | |
# Set assets data | |
$assets = "https://github.com/Garey27/hitbox_fixer/releases/download/1.1.5/hitbox_fix-bin-1.1.5.zip" | |
# Get ZIP file name | |
$zipName = "hitbox_fix-bin-1.1.5.zip" | |
# Download ZIP file | |
Invoke-WebRequest -Uri $assets -Out $zipName | |
# Extract ZIP File | |
Expand-Archive $zipName | |
# Get base name from ZIP file | |
$baseName = (Get-Item $zipName).BaseName | |
# DLL from path | |
$fromPath = ".\" + $baseName + "\addons\hitbox_fix\hitbox_fix_mm.dll" | |
# DLL dest path | |
$DestPath = ".\publish\addons\hitbox_fix\hitbox_fix_mm.dll" | |
# Copy item | |
Copy-Item -Path $fromPath -Destination $DestPath | |
- name: Download Accuracy Fix | |
run: | | |
# Set assets data | |
$assets = "https://github.com/SmileYzn/AccuracyFix/releases/download/1.0.4/accuracyfix-windows.zip" | |
# Get ZIP file name | |
$zipName = "accuracyfix-windows.zip" | |
# Download ZIP file | |
Invoke-WebRequest -Uri $assets -Out $zipName | |
# Extract ZIP File | |
Expand-Archive $zipName | |
# Get base name from ZIP file | |
$baseName = (Get-Item $zipName).BaseName | |
# DLL from path | |
$fromPath = ".\" + $baseName + "\addons\accuracyfix\dlls\accuracyfix_mm.dll" | |
# DLL dest path | |
$DestPath = ".\publish\addons\accuracyfix\accuracyfix_mm.dll" | |
# Copy item | |
Copy-Item -Path $fromPath -Destination $DestPath | |
- name: Deploy artifacts | |
uses: actions/upload-artifact@main | |
with: | |
name: csdm-windows | |
path: publish/* |