|
@@ -0,0 +1,55 @@ |
|
|
|
|
|
version: build-{build} |
|
|
|
|
|
branches: |
|
|
|
|
|
only: |
|
|
|
|
|
- dev |
|
|
|
|
|
image: Visual Studio 2017 |
|
|
|
|
|
|
|
|
|
|
|
nuget: |
|
|
|
|
|
disable_publish_on_pr: true |
|
|
|
|
|
pull_requests: |
|
|
|
|
|
do_not_increment_build_number: true |
|
|
|
|
|
clone_folder: C:\Projects\Discord.Net |
|
|
|
|
|
cache: test/Discord.Net.Tests/cache.db |
|
|
|
|
|
|
|
|
|
|
|
environment: |
|
|
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1 |
|
|
|
|
|
DNET_TEST_TOKEN: |
|
|
|
|
|
secure: l7h5e7UE7yRd70hAB97kjPiQpPOShwqoBbOzEAYQ+XBd/Pre5OA33IXa3uisdUeQJP/nPFhcOsI+yn7WpuFaoQ== |
|
|
|
|
|
DNET_TEST_GUILDID: 273160668180381696 |
|
|
|
|
|
init: |
|
|
|
|
|
- ps: $Env:BUILD = "$($Env:APPVEYOR_BUILD_NUMBER.PadLeft(5, "0"))" |
|
|
|
|
|
|
|
|
|
|
|
build_script: |
|
|
|
|
|
- ps: appveyor-retry dotnet restore Discord.Net.sln -v Minimal /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" |
|
|
|
|
|
- ps: dotnet build Discord.Net.sln -c "Release" /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" |
|
|
|
|
|
- ps: dotnet pack "src\Discord.Net.Core\Discord.Net.Core.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" |
|
|
|
|
|
- ps: dotnet pack "src\Discord.Net.Rest\Discord.Net.Rest.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" |
|
|
|
|
|
- ps: dotnet pack "src\Discord.Net.WebSocket\Discord.Net.WebSocket.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" |
|
|
|
|
|
- ps: dotnet pack "src\Discord.Net.Rpc\Discord.Net.Rpc.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" |
|
|
|
|
|
- ps: dotnet pack "src\Discord.Net.Commands\Discord.Net.Commands.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" |
|
|
|
|
|
- ps: dotnet pack "src\Discord.Net.Webhook\Discord.Net.Webhook.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" |
|
|
|
|
|
- ps: dotnet pack "src\Discord.Net.Providers.WS4Net\Discord.Net.Providers.WS4Net.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" |
|
|
|
|
|
- ps: >- |
|
|
|
|
|
if ($Env:APPVEYOR_REPO_TAG -eq "true") { |
|
|
|
|
|
nuget pack src\Discord.Net\Discord.Net.nuspec -OutputDirectory "artifacts" -properties suffix="" |
|
|
|
|
|
} else { |
|
|
|
|
|
nuget pack src\Discord.Net\Discord.Net.nuspec -OutputDirectory "artifacts" -properties suffix="-$Env:BUILD" |
|
|
|
|
|
} |
|
|
|
|
|
test_script: |
|
|
|
|
|
- ps: >- |
|
|
|
|
|
if ($APPVEYOR_PULL_REQUEST_NUMBER -ne "") { |
|
|
|
|
|
dotnet test test/Discord.Net.Tests/Discord.Net.Tests.csproj -c "Release" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
artifacts: |
|
|
|
|
|
- path: artifacts/*.nupkg |
|
|
|
|
|
name: MyGet |
|
|
|
|
|
deploy: |
|
|
|
|
|
- provider: NuGet |
|
|
|
|
|
server: https://www.myget.org/F/discord-net/api/v2/package |
|
|
|
|
|
api_key: |
|
|
|
|
|
secure: Jl7BXeUjRnkVHDMBuUWSXcEOkrli1PBleW2IiLyUs5j63UNUNp1hcjaUJRujx9lz |
|
|
|
|
|
symbol_server: https://www.myget.org/F/discord-net/symbols/api/v2/package |
|
|
|
|
|
artifact: MyGet |
|
|
|
|
|
on: |
|
|
|
|
|
branch: dev |