Skip to content

Commit bcc4ea7

Browse files
authored
Dependencies update (#152)
* Updating NuGets to latest stable versions Added dependabot to keep dependencies up-to-date. * Fixing compile error from Moq exception class removal * Udating global.json to be 6 * Let global.json drive GHA
1 parent 33fbf25 commit bcc4ea7

File tree

13 files changed

+373
-351
lines changed

13 files changed

+373
-351
lines changed

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "nuget" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
13+
- package-ecosystem: "github-actions" # See documentation for possible values
14+
directory: "/" # Location of package manifests
15+
schedule:
16+
interval: "weekly"

.github/workflows/dotnetcore.yml

Lines changed: 101 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,101 @@
1-
name: Continuous
2-
3-
on:
4-
# PRs will be built, and a package posted to GH Packages
5-
pull_request:
6-
7-
push:
8-
paths-ignore:
9-
- 'README.md'
10-
- 'docs/**'
11-
12-
# We'll build, pack, and push a pre-release to NuGet on master
13-
branches: [ master ]
14-
15-
# Tagging with v* will build that version number and push a release to Nuget
16-
# e.g. v1.2, v3.4.5, etc.
17-
tags:
18-
- 'v*'
19-
20-
defaults:
21-
run:
22-
shell: pwsh
23-
24-
jobs:
25-
build:
26-
runs-on: ubuntu-latest
27-
steps:
28-
- uses: actions/checkout@v2
29-
- name: Setup .NET Core
30-
uses: actions/setup-dotnet@v1
31-
with:
32-
dotnet-version: 6.0.202
33-
34-
# Run unit tests
35-
- name: Test
36-
run: dotnet test --configuration Release --verbosity normal
37-
38-
# Package Release
39-
- name: Pack
40-
run: |
41-
<# If we're a tag, force VersionPrefix to the tag value #>
42-
if ('${{ github.ref }}' -match '^refs/tags/v') {
43-
$match = [regex]::Match('${{ github.ref }}', '^refs/tags/v([0-9]+(\.[0-9]+){1,2})')
44-
if ($match.Success) {
45-
$env:VersionPrefix = $match.Groups[1].Value
46-
} else {
47-
throw 'Invalid tag version: ${{ github.ref }}'
48-
}
49-
}
50-
else {
51-
<# All other pushes get a CI suffix #>
52-
$env:VersionSuffix = 'ci{0:0000}' -f ${{ github.run_number }}
53-
}
54-
55-
dotnet pack --configuration Release --verbosity normal --output .
56-
57-
- name: Upload NuGet
58-
uses: actions/upload-artifact@v3
59-
with:
60-
name: NuGet
61-
if-no-files-found: error
62-
path: |
63-
**/*.nupkg
64-
**/*.snupkg
65-
66-
# Update the docs
67-
- name: Update Docs
68-
if: github.event_name == 'push'
69-
run: |
70-
dotnet tool install xmldocmd
71-
dotnet tool run xmldocmd .\Moq.AutoMock\bin\Release\net461\Moq.AutoMock.dll .\docs
72-
73-
$modified = $(git status -u --porcelain)
74-
if ($modified.Where({$_.Contains(" docs/")}, 'First').Count -lt 1) {
75-
return 0
76-
}
77-
78-
# Create docs pull request
79-
- name: Create Pull Request
80-
uses: peter-evans/create-pull-request@v3
81-
if: github.event_name == 'push'
82-
with:
83-
commit-message: |
84-
[Docs update detected by Github Action].
85-
Auto generated pull request.
86-
branch: docs/automated-update
87-
delete-branch: true
88-
base: master
89-
title: Update Docs [GitHub Action]
90-
body: |
91-
[Docs update detected by Github Action].
92-
Auto generated pull request.
93-
94-
# Publish to NuGet and GitHub Packages
95-
- name: Publish
96-
if: github.event_name == 'push'
97-
run: |
98-
dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate
99-
dotnet nuget push *.nupkg `
100-
--source 'https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json' `
101-
--api-key '${{ github.token }}' `
102-
--skip-duplicate
1+
name: Continuous
2+
3+
on:
4+
# PRs will be built, and a package posted to GH Packages
5+
pull_request:
6+
7+
push:
8+
paths-ignore:
9+
- 'README.md'
10+
- 'docs/**'
11+
12+
# We'll build, pack, and push a pre-release to NuGet on master
13+
branches: [ master ]
14+
15+
# Tagging with v* will build that version number and push a release to Nuget
16+
# e.g. v1.2, v3.4.5, etc.
17+
tags:
18+
- 'v*'
19+
20+
defaults:
21+
run:
22+
shell: pwsh
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v2
29+
30+
- name: Setup .NET Core
31+
uses: actions/setup-dotnet@v1
32+
33+
# Run unit tests
34+
- name: Test
35+
run: dotnet test --configuration Release --verbosity normal
36+
37+
# Package Release
38+
- name: Pack
39+
run: |
40+
<# If we're a tag, force VersionPrefix to the tag value #>
41+
if ('${{ github.ref }}' -match '^refs/tags/v') {
42+
$match = [regex]::Match('${{ github.ref }}', '^refs/tags/v([0-9]+(\.[0-9]+){1,2})')
43+
if ($match.Success) {
44+
$env:VersionPrefix = $match.Groups[1].Value
45+
} else {
46+
throw 'Invalid tag version: ${{ github.ref }}'
47+
}
48+
}
49+
else {
50+
<# All other pushes get a CI suffix #>
51+
$env:VersionSuffix = 'ci{0:0000}' -f ${{ github.run_number }}
52+
}
53+
54+
dotnet pack --configuration Release --verbosity normal --output .
55+
56+
- name: Upload NuGet
57+
uses: actions/upload-artifact@v3
58+
with:
59+
name: NuGet
60+
if-no-files-found: error
61+
path: |
62+
**/*.nupkg
63+
**/*.snupkg
64+
65+
# Update the docs
66+
- name: Update Docs
67+
if: github.event_name == 'push'
68+
run: |
69+
dotnet tool install xmldocmd
70+
dotnet tool run xmldocmd .\Moq.AutoMock\bin\Release\net461\Moq.AutoMock.dll .\docs
71+
72+
$modified = $(git status -u --porcelain)
73+
if ($modified.Where({$_.Contains(" docs/")}, 'First').Count -lt 1) {
74+
return 0
75+
}
76+
77+
# Create docs pull request
78+
- name: Create Pull Request
79+
uses: peter-evans/create-pull-request@v3
80+
if: github.event_name == 'push'
81+
with:
82+
commit-message: |
83+
[Docs update detected by Github Action].
84+
Auto generated pull request.
85+
branch: docs/automated-update
86+
delete-branch: true
87+
base: master
88+
title: Update Docs [GitHub Action]
89+
body: |
90+
[Docs update detected by Github Action].
91+
Auto generated pull request.
92+
93+
# Publish to NuGet and GitHub Packages
94+
- name: Publish
95+
if: github.event_name == 'push'
96+
run: |
97+
dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate
98+
dotnet nuget push *.nupkg `
99+
--source 'https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json' `
100+
--api-key '${{ github.token }}' `
101+
--skip-duplicate
Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
7-
<IsPackable>false</IsPackable>
8-
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
9-
</PropertyGroup>
10-
11-
<ItemGroup>
12-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
13-
<PackageReference Include="MSTest.TestAdapter" Version="2.2.9" />
14-
<PackageReference Include="MSTest.TestFramework" Version="2.2.9" />
15-
<PackageReference Include="coverlet.collector" Version="3.1.2">
16-
<PrivateAssets>all</PrivateAssets>
17-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
18-
</PackageReference>
19-
</ItemGroup>
20-
21-
<ItemGroup>
22-
<ProjectReference Include="..\..\Moq.AutoMocker.TestGenerator\Moq.AutoMocker.TestGenerator.csproj">
23-
<OutputItemType>Analyzer</OutputItemType>
24-
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
25-
</ProjectReference>
26-
27-
<ProjectReference Include="..\Moq.AutoMocker.Generator.Example\Moq.AutoMock.Generator.Example.csproj" />
28-
<ProjectReference Include="..\..\Moq.AutoMock\Moq.AutoMock.csproj" />
29-
</ItemGroup>
30-
31-
</Project>
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
7+
<IsPackable>false</IsPackable>
8+
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
13+
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
14+
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
15+
<PackageReference Include="coverlet.collector" Version="3.1.2">
16+
<PrivateAssets>all</PrivateAssets>
17+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
18+
</PackageReference>
19+
</ItemGroup>
20+
21+
<ItemGroup>
22+
<ProjectReference Include="..\..\Moq.AutoMocker.TestGenerator\Moq.AutoMocker.TestGenerator.csproj">
23+
<OutputItemType>Analyzer</OutputItemType>
24+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
25+
</ProjectReference>
26+
27+
<ProjectReference Include="..\Moq.AutoMocker.Generator.Example\Moq.AutoMock.Generator.Example.csproj" />
28+
<ProjectReference Include="..\..\Moq.AutoMock\Moq.AutoMock.csproj" />
29+
</ItemGroup>
30+
31+
</Project>
Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
7-
<IsPackable>false</IsPackable>
8-
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
9-
</PropertyGroup>
10-
11-
<ItemGroup>
12-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
13-
<PackageReference Include="NUnit" Version="3.13.3" />
14-
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
15-
<PackageReference Include="coverlet.collector" Version="3.1.2">
16-
<PrivateAssets>all</PrivateAssets>
17-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
18-
</PackageReference>
19-
</ItemGroup>
20-
21-
<ItemGroup>
22-
<ProjectReference Include="..\..\Moq.AutoMocker.TestGenerator\Moq.AutoMocker.TestGenerator.csproj">
23-
<OutputItemType>Analyzer</OutputItemType>
24-
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
25-
</ProjectReference>
26-
<ProjectReference Include="..\Moq.AutoMocker.Generator.Example\Moq.AutoMock.Generator.Example.csproj" />
27-
<ProjectReference Include="..\..\Moq.AutoMock\Moq.AutoMock.csproj" />
28-
</ItemGroup>
29-
30-
</Project>
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
7+
<IsPackable>false</IsPackable>
8+
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
13+
<PackageReference Include="NUnit" Version="3.13.3" />
14+
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
15+
<PackageReference Include="coverlet.collector" Version="3.1.2">
16+
<PrivateAssets>all</PrivateAssets>
17+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
18+
</PackageReference>
19+
</ItemGroup>
20+
21+
<ItemGroup>
22+
<ProjectReference Include="..\..\Moq.AutoMocker.TestGenerator\Moq.AutoMocker.TestGenerator.csproj">
23+
<OutputItemType>Analyzer</OutputItemType>
24+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
25+
</ProjectReference>
26+
<ProjectReference Include="..\Moq.AutoMocker.Generator.Example\Moq.AutoMock.Generator.Example.csproj" />
27+
<ProjectReference Include="..\..\Moq.AutoMock\Moq.AutoMock.csproj" />
28+
</ItemGroup>
29+
30+
</Project>

0 commit comments

Comments
 (0)