Skip to content

Commit 68a6bc6

Browse files
committed
Use GitHub action
1 parent a55cd23 commit 68a6bc6

File tree

7 files changed

+77
-47
lines changed

7 files changed

+77
-47
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- name: Setup .NET Core
17+
uses: actions/setup-dotnet@v1
18+
- name: Use GitVersion
19+
run: |
20+
dotnet tool install --global GitVersion.Tool --version 5.3.7
21+
dotnet-gitversion /output buildserver /nofetch
22+
- name: Install dependencies
23+
run: dotnet restore
24+
- name: Build
25+
run: dotnet build --configuration Release --no-restore
26+
- name: Test
27+
run: dotnet test --configuration Release --no-restore --verbosity normal
28+
- name: Upload artifact
29+
uses: actions/[email protected]
30+
with:
31+
path: |
32+
AutofacContrib.NSubstitute/bin/Release/*.nupkg
33+
AutofacContrib.NSubstitute/bin/Release/*.snupkg

AutofacContrib.NSubstitute.sln

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A5ECD18F-1D42-444E-BB3A-6062D8B0E256}"
1111
ProjectSection(SolutionItems) = preProject
1212
BREAKING_CHANGES.md = BREAKING_CHANGES.md
13+
Directory.Build.props = Directory.Build.props
14+
Directory.Build.targets = Directory.Build.targets
1315
global.json = global.json
1416
LICENSE = LICENSE
1517
logo.png = logo.png
Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<AssemblyName>AutofacContrib.NSubstitute</AssemblyName>
66
<RootNamespace>AutofacContrib.NSubstitute</RootNamespace>
77
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
8-
<Version>4.9.4</Version>
9-
<AssemblyVersion>4.9.4.0</AssemblyVersion>
8+
</PropertyGroup>
9+
10+
<PropertyGroup>
11+
<Authors>Miguel Madero, Robert Moore and Matt Davies</Authors>
12+
<Description>Auto-mocking Autofac container that uses NSubstitute.</Description>
13+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
14+
<PackageIcon>logo.png</PackageIcon>
15+
<PackageTags>substitute mocking mocks nsubstitute autofac container dependency-injection di testing unit-testing TDD AAA auto-mock auto-substitute</PackageTags>
1016
</PropertyGroup>
1117

1218
<ItemGroup>
1319
<PackageReference Include="Autofac" Version="5.2.0" />
1420
<PackageReference Include="NSubstitute" Version="4.2.2" />
1521
</ItemGroup>
1622

23+
<ItemGroup>
24+
<None Include="../LICENSE" Pack="true" PackagePath=""/>
25+
<None Include="../logo.png" Pack="true" PackagePath=""/>
26+
</ItemGroup>
27+
1728
</Project>

AutofacContrib.NSubstitute/AutofacContrib.NSubstitute.nuspec

Lines changed: 0 additions & 43 deletions
This file was deleted.

Directory.Build.props

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
5+
<IncludeSymbols>true</IncludeSymbols>
6+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
7+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
8+
</PropertyGroup>
9+
10+
<PropertyGroup>
11+
<InformationalVersion>$(GitVersion_InformationalVersion)</InformationalVersion>
12+
<FileVersion>$(GitVersion_MajorMinorPatch)</FileVersion>
13+
<AssemblyVersion>$(GitVersion_AssemblySemVer)</AssemblyVersion>
14+
<Version>$(GitVersion_NuGetVersionV2)</Version>
15+
</PropertyGroup>
16+
17+
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
18+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
19+
</PropertyGroup>
20+
21+
<ItemGroup>
22+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
23+
</ItemGroup>
24+
25+
</Project>

Directory.Build.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<Project>
2+
</Project>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "3.1.302",
3+
"version": "3.1.402",
44
"rollForward": "feature"
55
}
66
}

0 commit comments

Comments
 (0)