2017-02-23 17:50:57 +00:00
version : '{build}-{branch}'
2017-02-12 14:15:20 +00:00
pull_requests :
do_not_increment_build_number : true
2017-02-20 14:37:38 +00:00
branches :
only :
- master
2017-01-16 02:03:19 +00:00
skip_branch_with_pr : true
2018-03-17 16:11:41 +00:00
image :
- Visual Studio 2017
- Visual Studio 2017 Preview
2016-04-20 23:09:52 +00:00
configuration : Release
platform : Any CPU
clone_depth : 10
2017-06-30 01:54:48 +00:00
environment :
DOTNET_CLI_TELEMETRY_OPTOUT : true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE : true
2017-12-29 02:40:44 +00:00
VARIANTS: generic win-x64 linux-x64 linux-arm osx-x64 # NOTE : When modifying variants, don't forget to update ASF_VARIANT definitions in SharedInfo.cs!
2017-08-18 17:41:17 +00:00
matrix :
2018-04-17 08:59:06 +00:00
allow_failures :
- image : Visual Studio 2017 Preview
2017-08-18 17:41:17 +00:00
fast_finish : true
2017-06-27 16:36:40 +00:00
before_build :
2018-03-17 17:06:30 +00:00
- pwsh : >-
2017-10-15 09:04:25 +00:00
Set-StrictMode -Version Latest
2017-10-15 09:45:05 +00:00
2017-08-18 17:41:17 +00:00
$ErrorActionPreference = 'Stop'
2017-10-15 09:45:05 +00:00
2017-10-15 09:04:25 +00:00
$ProgressPreference = 'SilentlyContinue'
2017-08-18 17:41:17 +00:00
2017-10-23 10:46:47 +00:00
2017-08-18 17:41:17 +00:00
dotnet --info
2018-05-19 19:48:26 +00:00
if ($LastExitCode -ne 0) {
throw "Command failed."
}
2017-08-18 17:41:17 +00:00
build_script :
2018-03-17 17:06:30 +00:00
- pwsh : >-
2017-10-15 09:04:25 +00:00
Set-StrictMode -Version Latest
2017-10-15 09:45:05 +00:00
2017-08-18 17:41:17 +00:00
$ErrorActionPreference = 'Stop'
2017-10-15 09:45:05 +00:00
2017-10-15 09:04:25 +00:00
$ProgressPreference = 'SilentlyContinue'
2017-08-18 17:41:17 +00:00
2017-10-23 10:46:47 +00:00
2018-05-25 20:08:23 +00:00
dotnet build ArchiSteamFarm -c "$env:CONFIGURATION" -o 'out\source' /nologo "/p:ASFVariant=generic"
2018-05-19 19:48:26 +00:00
if ($LastExitCode -ne 0) {
throw "Command failed."
}
2017-08-18 17:41:17 +00:00
test_script :
2018-03-17 17:06:30 +00:00
- pwsh : >-
2017-10-15 09:04:25 +00:00
Set-StrictMode -Version Latest
2017-10-15 09:45:05 +00:00
2017-08-18 17:41:17 +00:00
$ErrorActionPreference = 'Stop'
2017-10-15 09:45:05 +00:00
2017-10-15 09:04:25 +00:00
$ProgressPreference = 'SilentlyContinue'
2017-08-18 17:41:17 +00:00
2017-10-23 10:46:47 +00:00
2018-05-13 18:33:44 +00:00
dotnet test ArchiSteamFarm.Tests -c "$env:CONFIGURATION" -o 'out\source' /nologo
2018-05-19 19:48:26 +00:00
if ($LastExitCode -ne 0) {
throw "Command failed."
}
2017-07-10 06:33:38 +00:00
after_test :
2018-03-17 17:06:30 +00:00
- pwsh : >-
2017-10-15 09:04:25 +00:00
Set-StrictMode -Version Latest
2017-10-15 09:45:05 +00:00
2017-06-30 05:54:18 +00:00
$ErrorActionPreference = 'Stop'
2017-10-15 09:45:05 +00:00
2017-10-15 09:04:25 +00:00
$ProgressPreference = 'SilentlyContinue'
2017-06-30 02:07:28 +00:00
2017-10-23 10:46:47 +00:00
2017-08-18 17:41:17 +00:00
$PublishBlock = {
2017-11-29 00:22:40 +00:00
param($Variant)
2017-07-05 01:35:09 +00:00
2017-10-15 09:04:25 +00:00
Set-StrictMode -Version Latest
2017-08-18 17:41:17 +00:00
$ErrorActionPreference = 'Stop'
2017-10-15 09:04:25 +00:00
$ProgressPreference = 'SilentlyContinue'
2017-06-30 02:43:39 +00:00
2017-08-18 17:41:17 +00:00
Set-Location -Path "$env:APPVEYOR_BUILD_FOLDER"
2017-07-05 01:35:09 +00:00
2017-11-29 00:22:40 +00:00
if ($Variant -eq 'generic') {
2018-05-10 19:35:03 +00:00
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$Variant" /nologo "/p:ASFVariant=$Variant"
2017-08-18 17:41:17 +00:00
} else {
2018-05-10 19:35:03 +00:00
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$Variant" -r "$Variant" /nologo "/p:ASFVariant=$Variant" "/p:CrossGenDuringPublish=false"
2017-08-18 17:41:17 +00:00
}
2017-06-30 05:54:18 +00:00
2018-05-19 19:48:26 +00:00
if ($LastExitCode -ne 0) {
throw "Command failed."
}
2017-09-27 00:58:57 +00:00
# If we include any helper scripts for this variant, copy them to output directory
2017-11-29 00:22:40 +00:00
if (Test-Path -Path "ArchiSteamFarm\scripts\$Variant" -PathType Container) {
Copy-Item "ArchiSteamFarm\scripts\$Variant\*" -Destination "ArchiSteamFarm\out\$Variant"
2017-09-23 02:43:27 +00:00
}
2017-09-27 00:58:57 +00:00
# Until https://github.com/dotnet/cli/issues/3267 happens, we'll hack dotnet binary icon on Windows and include .ico file on other platforms
2017-11-29 00:22:40 +00:00
if (Test-Path -Path "ArchiSteamFarm\out\$Variant\ArchiSteamFarm.exe" -PathType Leaf) {
tools\rcedit\rcedit-x64.exe "ArchiSteamFarm\out\$Variant\ArchiSteamFarm.exe" --set-icon 'resources\ASF.ico'
2018-05-19 19:48:26 +00:00
if ($LastExitCode -ne 0) {
throw "Command failed."
}
2017-09-27 01:03:38 +00:00
} else {
2017-11-29 00:22:40 +00:00
Copy-Item 'resources\ASF.ico' -Destination "ArchiSteamFarm\out\$Variant\ArchiSteamFarm.ico"
2017-09-27 00:58:57 +00:00
}
2018-03-17 16:11:41 +00:00
$zipArgs = '-mx=1'
2017-09-26 04:30:20 +00:00
if ($env:APPVEYOR_REPO_TAG -eq 'true') {
2017-09-28 03:07:23 +00:00
# Update link in Changelog.html accordingly
2017-11-29 00:22:40 +00:00
if (Test-Path -Path "ArchiSteamFarm\out\$Variant\Changelog.html" -PathType Leaf) {
(Get-Content -Path "ArchiSteamFarm\out\$Variant\Changelog.html").Replace('ArchiSteamFarm/commits/master', "ArchiSteamFarm/releases/tag/$env:APPVEYOR_REPO_TAG_NAME") | Set-Content -Path "ArchiSteamFarm\out\$Variant\Changelog.html"
2017-09-28 03:07:23 +00:00
}
2018-03-17 16:11:41 +00:00
if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq 'Visual Studio 2017') {
$zipArgs = '-mx=9', '-mfb=257', '-mpass=15'
}
2017-09-26 04:30:20 +00:00
}
2017-11-29 00:22:40 +00:00
7z a -bd -tzip -mm=Deflate64 $zipArgs "ArchiSteamFarm\out\ASF-$Variant.zip" "$env:APPVEYOR_BUILD_FOLDER\ArchiSteamFarm\out\$Variant\*"
2018-05-19 19:48:26 +00:00
if ($LastExitCode -ne 0) {
throw "Command failed."
}
2018-03-17 17:06:30 +00:00
# TODO: Change me to Push-AppveyorArtifact once https://github.com/appveyor/ci/issues/2183 is fixed
appveyor PushArtifact "ArchiSteamFarm\out\ASF-$Variant.zip" -FileName "ASF-$Variant.zip" -DeploymentName "ASF-$Variant.zip"
2018-05-19 19:48:26 +00:00
if ($LastExitCode -ne 0) {
throw "Command failed."
}
2017-06-30 04:18:03 +00:00
}
2017-08-18 17:41:17 +00:00
2017-11-29 00:22:40 +00:00
foreach ($variant in $env:VARIANTS.Split([char[]] $null, [System.StringSplitOptions]::RemoveEmptyEntries)) {
Start-Job -Name "$variant" -ScriptBlock $PublishBlock -ArgumentList "$variant"
2017-08-18 17:41:17 +00:00
}
Get-Job | Receive-Job -AutoRemoveJob -Wait
2017-06-30 01:54:48 +00:00
deploy :
- provider : GitHub
tag : $(appveyor_repo_tag_name)
2017-07-05 06:00:30 +00:00
release : ArchiSteamFarm V$(appveyor_repo_tag_name)
2018-03-17 16:11:41 +00:00
description: '**NOTICE : Pre-releases are experimental versions that often contain unpatched bugs, work-in-progress features or rewritten implementations. If you don''t consider yourself advanced user, please download **[latest stable release](https://github.com/JustArchi/ArchiSteamFarm/releases/latest)** instead. Pre-release versions are dedicated to users who know how to report bugs, deal with issues and give feedback - no technical support will be given. Check out ASF **[release cycle](https://github.com/JustArchi/ArchiSteamFarm/wiki/Release-cycle)** if you''d like to learn more.**\n\n---\n\nThis is automated AppVeyor GitHub deployment, human-readable changelog should be available soon. In the meantime please refer to **[GitHub commits](https://github.com/JustArchi/ArchiSteamFarm/commits/$(appveyor_repo_tag_name))**.\n\n---\n\nASF is available for free. If you''re grateful for what we''re doing, please consider donating. Developing ASF requires massive amount of time and knowledge, especially when it comes to Steam (and its problems). Even $1 is highly appreciated and shows that you care. Thank you!\n\n [![Patreon support](https://img.shields.io/badge/Patreon-support-yellow.svg)](https://www.patreon.com/JustArchi) [![Paypal.me donate](https://img.shields.io/badge/Paypal.me-donate-yellow.svg)](https://www.paypal.me/JustArchi/5usd) [![Paypal donate](https://img.shields.io/badge/Paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HD2P2P3WGS5Y4) [![Bitcoin donate](https://img.shields.io/badge/Bitcoin-donate-yellow.svg)](https://blockchain.info/payment_request?address=1Archi6M1r5b41Rvn1SY2FfJAzsrEUT7aT) [![Steam donate](https://img.shields.io/badge/Steam-donate-yellow.svg)](https://steamcommunity.com/tradeoffer/new/?partner=46697991&token=0ix2Ruv_)'
2017-06-30 01:54:48 +00:00
auth_token :
secure : QC5gIDMvSpd43EG6qW8d1E3ZHiVU4aR7pbKQonXstjj/JtAABf5S1IbtoY4OsnOR
artifact : /.*/
2017-07-05 03:49:23 +00:00
draft : false
2017-06-30 01:54:48 +00:00
prerelease : true
force_update : false
on :
branch : master
configuration : Release
2018-03-17 16:11:41 +00:00
appveyor_build_worker_image : Visual Studio 2017
2017-07-15 02:45:44 +00:00
appveyor_repo_tag : true
notifications :
- provider : Webhook
url :
2017-07-15 03:21:25 +00:00
secure : i/og7KzkpbcWcKoUubrLH+KB6bkfqA55FHUlGxLepLmgZNQeNMiMoAFICOFY795fFrFfUNUKqwk7ApXE6HUyWMoiijLj7G/JBLTPkBiTCu8fZMTMqwQm6FiHB3+/0h0C+ukcrBEqnXYSQUh6znpKqJSTrIfXUQ7ftNuC966kBAw=
2017-07-15 02:45:44 +00:00
method : POST
body : >-
{
"avatar_url": "https://www.appveyor.com/assets/img/appveyor-logo-256.png" ,
"username": "AppVeyor" ,
2018-03-17 16:13:04 +00:00
"content": "[{{projectName}}:{{branch}}] {{commitMessage}} by {{committerName}} ({{commitId}}) | {{buildUrl}} | **{{status}}**"
2017-07-15 02:45:44 +00:00
}
on_build_success : true
on_build_failure : true
on_build_status_changed : false