Files
Torch/appveyor.yml
2022-02-03 19:49:16 +07:00

66 lines
1.7 KiB
YAML

version: 1.0.{build}-{branch}
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
skip_tags: true
image: Visual Studio 2022
configuration: Release
platform: x64
shallow_clone: true
assembly_info:
patch: true
file: '**\AssemblyVersion.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: v{version}
install:
- pwsh: >-
$steamData = "c:/steam/dedi/"
$steamCMDPath = "c:/steam/cmd/"
$steamCMDZip = "steamcmd.zip"
if (!(Test-Path $steamData)) {
mkdir "$steamData"
}
if (!(Test-Path $steamCMDPath)) {
if (!(Test-Path $steamCMDZip)) {
Invoke-WebRequest -OutFile $steamCMDZip https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip
}
Expand-Archive $steamCMDZip -DestinationPath $steamCMDPath
}
& "$steamCMDPath/steamcmd.exe" "+login anonymous" "+force_install_dir $steamData" "+app_update 298740" "+quit"
$dataPath = $steamData.Replace("/", "\");
$contentPath = "$dataPath\Content";
if (Test-Path $contentPath) {
Remove-Item -LiteralPath $contentPath -Force -Recurse
}
cmd /S /C mklink /J .\GameBinaries $dataPath\DedicatedServer64
cache:
- c:\steam\dedi\
- c:\steam\cmd\
build_script:
- pwsh: >-
dotnet publish .\Torch.Server\Torch.Server.csproj --self-contained -f net6-windows -r win-x64 -c Release -o .\publish\
Compress-Archive -Path .\publish\* -DestinationPath .\torch-server.zip
artifacts:
- path: torch-server.zip
deploy:
- provider: GitHub
tag: v$(appveyor_build_version)
release: Torch - v$(appveyor_build_version)
auth_token:
secure: IOhwzgIpj85iHitQBiH4chKPL9fXAinEnqUcbZk0ANhfTmdUFh74ko7Bt7LoSJFy
artifact: torch-server.zip
on:
branch: master