Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
adding the very first version of AppVeyor CI support
Browse files Browse the repository at this point in the history
  • Loading branch information
salaros committed Dec 26, 2017
1 parent 670d172 commit 6e9da6a
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 0 deletions.
1 change: 1 addition & 0 deletions OpenMcdf.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
.gitattributes = .gitattributes
.gitignore = .gitignore
appveyor.yml = appveyor.yml
LICENSE.md = LICENSE.md
README.md = README.md
EndProjectSection
Expand Down
134 changes: 134 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Operating system (build VM template)
os: Windows Server 2016

# If the build configuration does not specify build worker image
# then Visual Studio 2015 image is used.
image: Visual Studio 2017

# Restrict to Git branches below
branches:
only:
- master

# Scripts that run after cloning repository
install:
- nuget restore

# Cache files until appveyor.yml is modified.
cache:
- packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
- '%LocalAppData%\NuGet\Cache' # NuGet < v3
- '%LocalAppData%\NuGet\v3-cache' # NuGet v3

# Version format
version: 2.1.1.{build}

environment:
VERSION_SIMPLE: '{version}'
VERSION_INFORMATIONAL: '{version}'
VERSION_SUFFIX: '-preview-$(APPVEYOR_BUILD_NUMBER)'
VERSION_SUFFIX_TAG: '-$(APPVEYOR_BUILD_NUMBER)'

init:
- ps: |
$env:VERSION_SIMPLE = $env:APPVEYOR_BUILD_VERSION
$env:VERSION_INFORMATIONAL = $env:APPVEYOR_BUILD_VERSION.TrimEnd(".$env:APPVEYOR_BUILD_NUMBER")
if ($env:APPVEYOR_REPO_TAG -eq "true" -and $env:APPVEYOR_REPO_TAG_NAME)
{
$env:VERSION_SUFFIX = $env:VERSION_SUFFIX_TAG
$tag_version = $env:APPVEYOR_REPO_TAG_NAME.TrimStart("v")
Write-Host "Building a tag: $tag_version";
if ($tag_version -match '([0-9]+[\.-][0-9]+[\.-][0-9]+([-A-Za-z0-9]+)?)')
{
$env:VERSION_INFORMATIONAL = $tag_version
}
if ($tag_version -match '^([0-9]+\.[0-9]+\.[0-9]+)$')
{
$env:VERSION_INFORMATIONAL = "$tag_version$env:VERSION_SUFFIX"
}
}
else
{
$env:VERSION_INFORMATIONAL = "$env:VERSION_INFORMATIONAL$env:VERSION_SUFFIX"
}
Update-AppveyorBuild -Version $env:VERSION_INFORMATIONAL
Write-Host "Using build version: $env:APPVEYOR_BUILD_VERSION";
dotnet_csproj:
patch: true
file: '**\*.csproj'
assembly_version: $(VERSION_SIMPLE)
file_version: $(VERSION_SIMPLE)
version: $(VERSION_INFORMATIONAL)
package_version: $(VERSION_INFORMATIONAL)
informational_version: $(VERSION_INFORMATIONAL)

assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: $(VERSION_SIMPLE)
assembly_file_version: $(VERSION_SIMPLE)
assembly_informational_version: $(VERSION_INFORMATIONAL)

# Run scripts below before
before_build:
- where msbuild
- cmd: msbuild /t:Clean

# To run your custom scripts instead of automatic MSBuild
build_script:
- cmd: msbuild /t:Rebuild /p:Configuration=Debug

# NuGet files qualified as artifacts
artifacts:
- path: 'bin\**\*.nupkg' # find the NuGet files
name: OpenMCDF

# Deploy to GitHub releases
deploy:
-
provider: GitHub
auth_token:
secure: 2+d0KgCbWQpUR8TZfzvUEzbi4NQP6F/Tt0PUwLn6jXZCyO8FnrFVFJPsFa0QBQFl
artifact: OpenMCDF
description: |-
Supports the following .NET frameworks and standards
* .NET 4.0
* [.NET 4.6.1](https://github.com/Microsoft/dotnet/blob/master/releases/net461/README.md)
* [.NET Standard 1.6](https://github.com/dotnet/standard/blob/master/docs/versions/netstandard1.6.md) (.NET Core >=1.0, .NET >=4.6.1, Mono >=4.6 etc)
* [.NET Standard 2.0](https://github.com/dotnet/standard/blob/master/docs/versions/netstandard2.0.md) (.NET Core >=2.0, .NET >=4.6.1, Mono >=5.4 etc)
draft: false
force_update: true
prerelease: false
release: "OpenMCDF v$(APPVEYOR_REPO_TAG_NAME)"
tag: $(APPVEYOR_REPO_TAG_NAME)
on:
appveyor_repo_tag: true

-
provider: NuGet
api_key:
secure: TrtChQUTQ9rD8pffK1A9bjMYyN/8eQUjV+7IKVjS/C37TgXMae46Bzd527bZUVSb
artifact: OpenMCDF
server: # remove to push to NuGet.org
skip_symbols: false
symbol_server: # remove to push symbols to SymbolSource.org
on:
appveyor_repo_tag: true

-
provider: NuGet
server: https://ci.appveyor.com/nuget/salaros/api/v2/package
symbol_server: https://ci.appveyor.com/nuget/salaros/api/v2/package
api_key:
secure: 3zmnmVBweTgdk4SBM/rWHdC9JOM9s0pxm1bw1d+WHDo=
artifact: OpenMCDF

# Start builds on tags only (GitHub and BitBucket)
skip_non_tags: false

# Turn off tests
test: off

0 comments on commit 6e9da6a

Please sign in to comment.