Skip to content

Commit

Permalink
Use GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
twsouthwick committed Oct 21, 2020
1 parent a55cd23 commit 68a6bc6
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 47 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- name: Use GitVersion
run: |
dotnet tool install --global GitVersion.Tool --version 5.3.7
dotnet-gitversion /output buildserver /nofetch
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-restore --verbosity normal
- name: Upload artifact
uses: actions/[email protected]
with:
path: |
AutofacContrib.NSubstitute/bin/Release/*.nupkg
AutofacContrib.NSubstitute/bin/Release/*.snupkg
2 changes: 2 additions & 0 deletions AutofacContrib.NSubstitute.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A5ECD18F-1D42-444E-BB3A-6062D8B0E256}"
ProjectSection(SolutionItems) = preProject
BREAKING_CHANGES.md = BREAKING_CHANGES.md
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
global.json = global.json
LICENSE = LICENSE
logo.png = logo.png
Expand Down
17 changes: 14 additions & 3 deletions AutofacContrib.NSubstitute/AutofacContrib.NSubstitute.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>AutofacContrib.NSubstitute</AssemblyName>
<RootNamespace>AutofacContrib.NSubstitute</RootNamespace>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>4.9.4</Version>
<AssemblyVersion>4.9.4.0</AssemblyVersion>
</PropertyGroup>

<PropertyGroup>
<Authors>Miguel Madero, Robert Moore and Matt Davies</Authors>
<Description>Auto-mocking Autofac container that uses NSubstitute.</Description>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>logo.png</PackageIcon>
<PackageTags>substitute mocking mocks nsubstitute autofac container dependency-injection di testing unit-testing TDD AAA auto-mock auto-substitute</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Autofac" Version="5.2.0" />
<PackageReference Include="NSubstitute" Version="4.2.2" />
</ItemGroup>

<ItemGroup>
<None Include="../LICENSE" Pack="true" PackagePath=""/>
<None Include="../logo.png" Pack="true" PackagePath=""/>
</ItemGroup>

</Project>
43 changes: 0 additions & 43 deletions AutofacContrib.NSubstitute/AutofacContrib.NSubstitute.nuspec

This file was deleted.

25 changes: 25 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project>

<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<PropertyGroup>
<InformationalVersion>$(GitVersion_InformationalVersion)</InformationalVersion>
<FileVersion>$(GitVersion_MajorMinorPatch)</FileVersion>
<AssemblyVersion>$(GitVersion_AssemblySemVer)</AssemblyVersion>
<Version>$(GitVersion_NuGetVersionV2)</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<Project>
</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "3.1.302",
"version": "3.1.402",
"rollForward": "feature"
}
}

0 comments on commit 68a6bc6

Please sign in to comment.