Skip to content

Commit

Permalink
tweak package generation
Browse files Browse the repository at this point in the history
  • Loading branch information
pwelter34 committed Sep 5, 2024
1 parent ddbed18 commit 3c426a0
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 60 deletions.
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ updates:
time: "02:00"
timezone: "America/Chicago"
open-pull-requests-limit: 10
ignore:
- dependency-name: "Microsoft.CodeAnalysis.CSharp"
groups:
Azure:
patterns:
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Build Project
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_ENVIRONMENT: github
ASPNETCORE_ENVIRONMENT: github
BUILD_PATH: "${{github.workspace}}/artifacts"
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

Expand Down Expand Up @@ -33,19 +35,14 @@ jobs:
with:
dotnet-version: 8.0.x

- name: Calculate Version
run: |
dotnet tool update -g minver-cli
echo "BUILD_VERSION=$(minver -v e -t v)" >> $GITHUB_ENV
- name: Restore Dependencies
run: dotnet restore

- name: Build Solution
run: 'dotnet build --no-restore --configuration Release -p:Version="${{env.BUILD_VERSION}}" -p:InformationalVersion="${{env.BUILD_VERSION}}+${{github.sha}}"'
run: dotnet build --no-restore --configuration Release

- name: Run Test
run: dotnet test --no-build --configuration Release --verbosity normal --collect:"XPlat Code Coverage" --settings coverlet.runsettings
run: dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings

- name: Report Coverage
if: success()
Expand All @@ -56,7 +53,7 @@ jobs:

- name: Create Packages
if: success() && github.event_name != 'pull_request'
run: 'nuget pack Injectio.nuspec -Version "${{env.BUILD_VERSION}}" -OutputDirectory "${{env.BUILD_PATH}}" -p Configuration=Release'
run: dotnet pack --configuration Release --no-build --output "${{env.BUILD_PATH}}"

- name: Upload Packages
if: success() && github.event_name != 'pull_request'
Expand Down
42 changes: 0 additions & 42 deletions Injectio.nuspec

This file was deleted.

4 changes: 2 additions & 2 deletions Injectio.sln
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
# 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{C2680CC3-2014-44BE-98B2-D4431437E0A1}"
ProjectSection(SolutionItems) = preProject
.github\dependabot.yml = .github\dependabot.yml
src\Directory.Build.props = src\Directory.Build.props
.github\workflows\dotnet.yml = .github\workflows\dotnet.yml
Injectio.nuspec = Injectio.nuspec
README.md = README.md
EndProjectSection
EndProject
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<ItemGroup>
<PackageReference Include="AssemblyMetadata.Generators" Version="2.0.0" PrivateAssets="All" />
<PackageReference Include="MinVer" Version="5.0.0" PrivateAssets="All" />
<PackageReference Include="MinVer" Version="6.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 6 additions & 1 deletion src/Injectio.Attributes/Injectio.Attributes.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<PackageId>Injectio</PackageId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<None Include="..\Injectio.Generators\bin\$(Configuration)\netstandard2.0\Injectio.Generators.dll" PackagePath="analyzers\dotnet\roslyn4.3\cs" Pack="true" Visible="false" />
<None Include="..\Injectio.Generators\bin\$(Configuration)\netstandard2.0\Injectio.Generators.props" PackagePath="analyzers\dotnet\roslyn4.3\cs" Pack="true" Visible="false" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/Injectio.Generators/DiagnosticDescriptors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace Injectio.Generators;

[ExcludeFromCodeCoverage]
internal class DiagnosticDescriptors
internal static class DiagnosticDescriptors
{
public static DiagnosticDescriptor InvalidModuleParameter => new(
id: "SD0010",
Expand Down
10 changes: 5 additions & 5 deletions tests/Injectio.Tests/Injectio.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<LangVersion>latest</LangVersion>
Expand All @@ -10,14 +10,14 @@

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="PolySharp" Version="1.14.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Verify.Xunit" Version="26.2.0" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<PackageReference Include="Verify.Xunit" Version="26.4.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 3c426a0

Please sign in to comment.