mirror of
https://github.com/gwdevhub/gMod.git
synced 2026-07-15 15:09:30 +00:00
75 lines
1.9 KiB
YAML
75 lines
1.9 KiB
YAML
name: gMod CD Pipeline
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
matrix:
|
|
targetplatform: [x86]
|
|
|
|
runs-on: windows-2025-vs2026
|
|
|
|
env:
|
|
Configuration: Release
|
|
Actions_Allow_Unsecure_Commands: true
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup MSBuild.exe
|
|
uses: microsoft/setup-msbuild@v1.3.1
|
|
|
|
- name: Install vcpkg
|
|
run: |
|
|
git clone https://github.com/microsoft/vcpkg.git
|
|
.\vcpkg\bootstrap-vcpkg.bat
|
|
|
|
- name: Set VCPKG_ROOT
|
|
run: |
|
|
echo "VCPKG_ROOT=$(Get-Location)\vcpkg" >> $env:GITHUB_ENV
|
|
shell: powershell
|
|
|
|
- name: Build CMake Files with vcpkg toolchain
|
|
run: cmake --preset=vcpkg
|
|
env:
|
|
VCPKG_ROOT: ${{ env.VCPKG_ROOT }}
|
|
|
|
- name: Build binaries
|
|
run: cmake --build build --config Release
|
|
|
|
- name: Retrieve version
|
|
id: set_version
|
|
run: |
|
|
$fileVersionInfo = (Get-Item -Path .\bin\Release\gMod.dll).VersionInfo.FileVersion
|
|
if ([string]::IsNullOrEmpty($fileVersionInfo)) {
|
|
Write-Host "The DLL file version information could not be retrieved."
|
|
exit 1
|
|
} else {
|
|
Write-Host "FileVersionInfo: $fileVersionInfo"
|
|
echo "::set-output name=version::$fileVersionInfo"
|
|
}
|
|
shell: pwsh
|
|
|
|
- name: Publish release
|
|
uses: Xotl/cool-github-releases@v1.1.8
|
|
with:
|
|
mode: update
|
|
tag_name: v${{ steps.set_version.outputs.version }}
|
|
release_name: gMod v${{ steps.set_version.outputs.version }}
|
|
assets: .\bin\Release\gMod.dll;.\bin\Release\TpfConvert.exe;.\bin\Release\d3dx9_43.dll
|
|
github_token: ${{ env.GITHUB_TOKEN }}
|
|
replace_assets: true
|
|
body_mrkdwn: ${{ env.Changelog }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|