Skip to content

Commit

Permalink
NuGet publication
Browse files Browse the repository at this point in the history
Add Nuget publication tasks to Azure Pipeline
  • Loading branch information
paveliam authored Sep 12, 2019
2 parents 758dc15 + 567d0c0 commit 05dff9f
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Description>Core functions for Selenium-based libraries for .NET</Description>
<PackageDescription>Core functions for Selenium-based libraries for .NET</PackageDescription>
<PackageLicenseExpression></PackageLicenseExpression>
<RepositoryUrl>https://github.com/aquality-automation/aquality-selenium-dotnet</RepositoryUrl>
<RepositoryUrl>https://github.com/aquality-automation/aquality-selenium-core-dotnet</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>selenium webdriver automation</PackageTags>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Reflection;
using Aquality.Selenium.Core.Elements.Interfaces;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private static IServiceCollection RegisterServices(Func<IServiceProvider, IAppli
var services = new ServiceCollection();
var startup = new Startup();
var settingsFile = new JsonFile($"Resources.settings.{SpecialSettingsFile}.json", Assembly.GetCallingAssembly());
new Startup().ConfigureServices(services, applicationSupplier, settingsFile);
startup.ConfigureServices(services, applicationSupplier, settingsFile);
services.AddSingleton<ITimeoutConfiguration>(new CustomTimeoutConfiguration(settingsFile));
return services;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Aquality.Selenium.Core.Elements;
using OpenQA.Selenium;
using OpenQA.Selenium;

namespace Aquality.Selenium.Core.Tests.Applications.WindowsApp.Elements
{
Expand Down
6 changes: 6 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
next-version: 1.0
mode: Mainline
increment: Inherit
branches: {}
ignore:
sha: []
29 changes: 28 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ pool:
vmImage: 'windows-latest'

steps:
- task: GitVersion@5
displayName: 'Run GitVersion'
inputs:
runtime: 'core'

- task: SonarCloudPrepare@1
displayName: 'Prepare SonarCloud analysis'
Expand Down Expand Up @@ -47,4 +51,27 @@ steps:
displayName: stop WinAppDriver
inputs:
OperationType: 'Stop'


- script: dotnet pack Aquality.Selenium.Core\src\Aquality.Selenium.Core\Aquality.Selenium.Core.csproj -c $(buildConfiguration) --no-build -p:Version=$(GitVersion.NuGetVersion) -o $(Build.ArtifactStagingDirectory)
displayName: 'Create NuGet package'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))

- task: NuGetCommand@2
displayName: 'Push NuGet package'
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/Aquality.Selenium.Core*.nupkg;!$(Build.ArtifactStagingDirectory)/**/Aquality.Selenium.Core*.symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'NuGet'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))

- task: GitHubRelease@0
displayName: 'Create tag on GitHub'
inputs:
gitHubConnection: 'GitHub'
repositoryName: 'aquality-automation/aquality-selenium-core-dotnet'
action: 'create'
tag: 'v$(GitVersion.NuGetVersion)'
tagSource: 'manual'
isPreRelease: contains(variables['GitVersion.NuGetVersion'], '-')
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))

0 comments on commit 05dff9f

Please sign in to comment.