Skip to content

Commit

Permalink
Update CI workflow and project files for improved packaging and versi…
Browse files Browse the repository at this point in the history
…oning (#62)

* Update CI workflow and project files for improved packaging and versioning

* Add step to restore Dotnet tools in CI workflow

* Refactor CI workflow to streamline .NET tool restoration and versioning

* Add NU5104 to NoWarn list in NugetPackage.Shared.props
  • Loading branch information
MattB-msft authored Jan 22, 2025
1 parent 4f30428 commit 0b2f102
Show file tree
Hide file tree
Showing 18 changed files with 29 additions and 60 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,25 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- uses: dotnet/nbgv@master
with:
setAllVars: true
- run: echo "NuGetPackageVersion $NuGetPackageVersion"

- name: Restore
run: dotnet restore AgentSdk.proj

- name: Build
run: dotnet build
run: dotnet build --no-restore -c debug AgentSdk.proj

- name: Package
run: dotnet pack --no-build --no-restore -c debug src/Microsoft.Agents.SDK.sln

- name: Test
run: dotnet test ./src/
run: dotnet test --no-build --no-restore -c debug ./src/
2 changes: 1 addition & 1 deletion src/NugetPackage.Shared.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageProjectUrl Condition="'$(PackageProjectUrl)' == ''">https://github.com/microsoft/agents</PackageProjectUrl>
<PackageLicenseUrl Condition="'$(PackageLicenseUrl)' == ''">https://github.com/microsoft/Agents-for-net?tab=MIT-1-ov-file#readme</PackageLicenseUrl>
<RepositoryUrl Condition="'$(RepositoryUrl)' == ''">https://github.com/Microsoft/Agents-for-net</RepositoryUrl>
<NoWarn>$(NoWarn);NU1701;NU1900;NU5125</NoWarn>
<NoWarn>$(NoWarn);NU1701;NU1900;NU5125;NU5104</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 7 additions & 0 deletions src/samples/Directory.Build.Props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<!-- See: https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2019#directorybuildprops-and-directorybuildtargets -->
<PropertyGroup>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<IsPackable>false</IsPackable>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
</PropertyGroup>
<Import Project="..\..\Build.Common.core.props" />

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup>
<PackageId>Microsoft.Agents.BotBuilder.Testing</PackageId>
<Description>Library for building bot tests using Microsoft Bot Framework Connector</Description>
Expand Down
6 changes: 6 additions & 0 deletions src/tests/Directory.Build.Props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>
<!-- See: https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2019#directorybuildprops-and-directorybuildtargets -->
<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
</PropertyGroup>
<Import Project="..\..\Build.Common.core.props" />


<PropertyGroup>
<!-- <TargetFramework>net8.0</TargetFramework> -->
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
</PropertyGroup>
<Import Project="..\..\Build.Common.core.props" />

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<None Remove="test.settings.json" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<Import Project="..\..\Build.Common.core.props" />

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<Content Remove="Cards\welcomeCard.json" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
</PropertyGroup>
<Import Project="..\..\Build.Common.core.props" />

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<None Remove="appsettings.json" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@

<Import Project="..\..\Build.Common.core.props" />

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>


<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" />
<PackageReference Include="Microsoft.Recognizers.Text.DataTypes.TimexExpression" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
</PropertyGroup>
<Import Project="..\..\Build.Common.core.props" />

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Properties\**" />
<EmbeddedResource Remove="Properties\**" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
</PropertyGroup>
<Import Project="..\..\Build.Common.core.props" />

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Properties\**" />
<EmbeddedResource Remove="Properties\**" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
</PropertyGroup>
<Import Project="..\..\Build.Common.core.props" />

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup>
<!-- <TargetFramework>net8.0</TargetFramework> -->
<IsPackable>false</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
</PropertyGroup>
<Import Project="..\..\Build.Common.core.props" />

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Properties\**" />
<EmbeddedResource Remove="Properties\**" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
</PropertyGroup>
<Import Project="..\..\Build.Common.core.props" />

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Properties\**" />
<EmbeddedResource Remove="Properties\**" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
</PropertyGroup>
<Import Project="..\..\Build.Common.core.props" />

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Properties\**" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
</PropertyGroup>
<Import Project="..\..\Build.Common.core.props" />

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Properties\**" />
<EmbeddedResource Remove="Properties\**" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
</PropertyGroup>
<Import Project="..\..\Build.Common.core.props" />

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Properties\**" />
<EmbeddedResource Remove="Properties\**" />
Expand Down

0 comments on commit 0b2f102

Please sign in to comment.