version: '2.1.1.{build}' # Do not build on tags because we create a release on merge to master. Otherwise will upload artifacts twice changing the hash, as well as triggering duplicate GitHub release action & NuGet deployments. skip_tags: true init: - ps: | $version = new-object System.Version $env:APPVEYOR_BUILD_VERSION $env:flowVersion = "{0}.{1}.{2}" -f $version.Major, $version.Minor, $version.Build if ($env:APPVEYOR_REPO_BRANCH -eq "dev") { $env:prereleaseTag = "{0}.{1}.{2}.{3}" -f $version.Major, $version.Minor, $version.Build, $version.Revision } - sc config WSearch start= auto # Starts Windows Search service- Needed for running ExplorerTest - net start WSearch cache: - '%USERPROFILE%\.nuget\packages -> **.sln, **.csproj' # preserve nuget folder (packages) unless the solution or projects change assembly_info: patch: true file: SolutionAssemblyInfo.cs assembly_version: $(flowVersion) assembly_file_version: $(flowVersion) assembly_informational_version: $(flowVersion) image: Visual Studio 2022 platform: Any CPU configuration: Release before_build: - ps: | nuget restore $jsonFiles = Get-ChildItem -Path ".\Plugins\*\plugin.json" foreach ($file in $jsonFiles) { $plugin_old_ver = Get-Content $file.FullName -Raw | ConvertFrom-Json (Get-Content $file) -replace '"Version"\s*:\s*".*?"', "`"Version`": `"$env:flowVersion`"" | Set-Content $file $plugin_new_ver = Get-Content $file.FullName -Raw | ConvertFrom-Json Write-Host "Updated" $plugin_old_ver.Name "version from" $plugin_old_ver.Version "to" $plugin_new_ver.Version } build: project: Flow.Launcher.sln verbosity: minimal test_script: - dotnet test --no-build -c Release after_test: - ps: .\Scripts\post_build.ps1 artifacts: - path: 'Output\Release\Flow.Launcher.Plugin.*.nupkg' name: Plugin nupkg - path: 'Output\Packages\Flow-Launcher-*.exe' name: Squirrel Installer - path: Output\Packages\Flow-Launcher-Portable.zip name: Portable Version - path: 'Output\Packages\FlowLauncher-*-full.nupkg' name: Squirrel nupkg - path: 'Output\Packages\RELEASES' name: Squirrel RELEASES deploy: - provider: NuGet artifact: Plugin nupkg api_key: secure: en+/GPSgfUVARoX0+lOeAAlbzvcCZAyBeVQaNq1AeXuRjjHgMwhBnt0PHVJXOepS on: branch: master - provider: GitHub repository: Flow-Launcher/Prereleases release: v$(prereleaseTag) description: | This is the early access build of our upcoming release. All changes contained here are reviewed, tested and stable to use. This build includes new changes from commit: $(APPVEYOR_REPO_COMMIT_MESSAGE) See all changes in this early access by going to the [milestones](https://github.com/Flow-Launcher/Flow.Launcher/milestones?sort=title&direction=asc) section and choosing the upcoming milestone. For latest production release visit [here](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest) Please report any bugs or issues over at the [main repository](https://github.com/Flow-Launcher/Flow.Launcher/issues)' auth_token: secure: ij4UeXUYQBDJxn2YRAAhUOjklOGVKDB87Hn5J8tKIzj13yatoI7sLM666QDQFEgv artifact: Squirrel Installer, Portable Version, Squirrel nupkg, Squirrel RELEASES force_update: true on: branch: dev - provider: GitHub release: v$(flowVersion) auth_token: secure: ij4UeXUYQBDJxn2YRAAhUOjklOGVKDB87Hn5J8tKIzj13yatoI7sLM666QDQFEgv artifact: Squirrel Installer, Portable Version, Squirrel nupkg, Squirrel RELEASES draft: true force_update: true on: branch: master