From 19d752889bd1770a3ea75d1b2ef0a89f47f06b86 Mon Sep 17 00:00:00 2001 From: Michael Ganss Date: Mon, 2 Jul 2018 15:21:48 +0200 Subject: [PATCH] Create tag on successful build --- appveyor.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 59bc338a..a4d8bb23 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,9 @@ version: 2.0.{build} skip_tags: true image: Visual Studio 2017 Preview +environment: + access_token: + secure: Eq6BjtZ80BXKLwFMg76IjuQAvbLjbojIF/X/ARouGVhxPneJtgDfCXMPNgJ7KBKq build_script: - ps: (Get-Content XmlSchemaClassGenerator\XmlSchemaClassGenerator.csproj).Replace("1.0.0-VERSION", $env:APPVEYOR_BUILD_VERSION) | Set-Content XmlSchemaClassGenerator\XmlSchemaClassGenerator.csproj - ps: (Get-Content XmlSchemaClassGenerator.Console\XmlSchemaClassGenerator.Console.csproj).Replace("1.0.0-VERSION", $env:APPVEYOR_BUILD_VERSION) | Set-Content XmlSchemaClassGenerator.Console\XmlSchemaClassGenerator.Console.csproj @@ -25,3 +28,10 @@ artifacts: - path: 'XmlSchemaClassGenerator.Console\**\*.nupkg' - path: 'xscgen\**\*.nupkg' - path: XmlSchemaClassGenerator.%APPVEYOR_BUILD_VERSION%.zip +on_success: + - git config --global credential.helper store + - ps: Add-Content "$HOME\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" + - git config --global user.email "michael@ganss.org" + - git config --global user.name "Michael Ganss" + - git tag v%APPVEYOR_BUILD_VERSION% + - git push origin --tags