Add AppVeyor config

This commit is contained in:
Matt Nadareski
2023-01-06 09:32:55 -08:00
parent a29071e697
commit 71f3295a2b

61
.vscode/appveyor.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
# version format
version: 0.2.4-{build}
# pull request template
pull_requests:
do_not_increment_build_number: true
# vm template
image: Visual Studio 2022
# msbuild configuration
configuration:
- Debug
# install dependencies
install:
- cd %APPVEYOR_BUILD_FOLDER%
- git submodule update --init --recursive
# build step
build_script:
- cmd: dotnet restore
- cmd: dotnet build NDecrypt\NDecrypt.csproj --framework net48
- cmd: dotnet publish NDecrypt\NDecrypt.csproj --framework net6.0 --runtime win-x86 --self-contained true -p:PublishSingleFile=true
- cmd: dotnet publish NDecrypt\NDecrypt.csproj --framework net6.0 --runtime win-x64 --self-contained true -p:PublishSingleFile=true
- cmd: dotnet publish NDecrypt\NDecrypt.csproj --framework net6.0 --runtime linux-x64 --self-contained true -p:PublishSingleFile=true
- cmd: dotnet publish NDecrypt\NDecrypt.csproj --framework net6.0 --runtime osx-x64 --self-contained true -p:PublishSingleFile=true
# post-build script
after_build:
- cmd: cd %APPVEYOR_BUILD_FOLDER%\NDecrypt\bin\Debug\net48
- cmd: 7z a -tzip %APPVEYOR_BUILD_FOLDER%\UnshieldSharp_net48.zip *
- cmd: cd %APPVEYOR_BUILD_FOLDER%\NDecrypt\bin\Debug\net6.0\win-x86\publish\
- cmd: 7z a -tzip %APPVEYOR_BUILD_FOLDER%\UnshieldSharp_net6.0_win-x86.zip *
- cmd: cd %APPVEYOR_BUILD_FOLDER%\NDecrypt\bin\Debug\net6.0\win-x64\publish\
- cmd: 7z a -tzip %APPVEYOR_BUILD_FOLDER%\UnshieldSharp_net6.0_win-x64.zip *
- cmd: cd %APPVEYOR_BUILD_FOLDER%\NDecrypt\bin\Debug\net6.0\linux-x64\publish\
- cmd: 7z a -tzip %APPVEYOR_BUILD_FOLDER%\UnshieldSharp_net6.0_linux-x64.zip *
- cmd: cd %APPVEYOR_BUILD_FOLDER%\NDecrypt\bin\Debug\net6.0\osx-x64\publish\
- cmd: 7z a -tzip %APPVEYOR_BUILD_FOLDER%\UnshieldSharp_net6.0_osx-x64.zip *
# success/failure tracking
on_success:
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
- ps: ./send.ps1 success $env:WEBHOOK_URL
on_failure:
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
- ps: ./send.ps1 failure $env:WEBHOOK_URL
# artifact linking
artifacts:
- path: UnshieldSharp_net48.zip
name: UnshieldSharp (.NET Framework 4.8)
- path: UnshieldSharp_net6.0_win-x86.zip
name: UnshieldSharp (.NET 6.0, Windows x86)
- path: UnshieldSharp_net6.0_win-x64.zip
name: UnshieldSharp (.NET 6.0, Windows x64)
- path: UnshieldSharp_net6.0_linux-x64.zip
name: UnshieldSharp (.NET 6.0, Linux x64)
- path: UnshieldSharp_net6.0_osx-x64.zip
name: UnshieldSharp (.NET 6.0, OSX x64)