Skip to content

Commit

Permalink
PT-1956: Support build/pack for .net6 (#28)
Browse files Browse the repository at this point in the history
* feat: Support build/pack for .net6

* Update main.yml

Co-authored-by: Alexandr Morogov <[email protected]>
  • Loading branch information
akak1977 and krankenbro authored Nov 26, 2021
1 parent bd07549 commit 41f6176
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,23 @@ jobs:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
NUGET_KEY: ${{ secrets.NUGET_KEY }}
BLOB_SAS: ${{ secrets.BLOB_TOKEN }}
MSBuildEnableWorkloadResolver: false

steps:

- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'

- name: Install VirtoCommerce.GlobalTool
uses: VirtoCommerce/vc-github-actions/setup-vcbuild@master
Expand Down
3 changes: 3 additions & 0 deletions Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Serialization;
using Microsoft.Build.Locator;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Nuke.Common;
Expand Down Expand Up @@ -54,6 +55,8 @@ internal partial class Build : NukeBuild

public static int Main(string[] args)
{
MSBuildLocator.RegisterDefaults();

if (args[0]?.ToLowerInvariant() == "help")
{
if (args.Length == 2)
Expand Down
3 changes: 2 additions & 1 deletion _build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<PackageId>VirtoCommerce.GlobalTool</PackageId>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<RootNamespace></RootNamespace>
<PackAsTool>true</PackAsTool>
Expand All @@ -24,6 +24,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Locator" Version="1.4.1" />
<PackageReference Include="Markdig" Version="0.24.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.14" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
Expand Down

0 comments on commit 41f6176

Please sign in to comment.