Skip to content

Commit

Permalink
.NET 7 and NativeAOT Builds
Browse files Browse the repository at this point in the history
Removed .NET 6 builds.
Added .NET 7 and NativeAOT builds.
  • Loading branch information
Kevin-Robertson committed Jun 13, 2023
1 parent 99da789 commit a07a71c
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 21 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,25 @@ jobs:
- name: Publish - Trimmed/Single File
run: |
VERSION=${{ github.ref_name }}
dotnet publish -r linux-x64 -f net7.0 -p:AssemblyName=inveigh -c debug
dotnet publish -r osx-x64 -f net7.0 -p:AssemblyName=inveigh -c debug
dotnet publish -r win-x64 -f net7.0 -c debug
dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -r linux-x64 -f net7.0 -p:AssemblyName=inveigh -c debug
dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -r osx-x64 -f net7.0 -p:AssemblyName=inveigh -c debug
dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -r win-x64 -f net7.0 -c debug
- name: Zip - Publish
run: |
tar -czvf Inveigh-net7.0-linux-x64-trimmed-single-dev.tar.gz --directory=$PWD/Inveigh/bin/debug/net7.0/linux-x64/publish/ .
tar -czvf Inveigh-net7.0-osx-x64-trimmed-single-dev.tar.gz --directory=$PWD/Inveigh/bin/debug/net7.0/osx-x64/publish/ .
7z a -tzip -mx9 Inveigh-net7.0-win-x64-trimmed-single-dev.zip $PWD/Inveigh/bin/debug/net7.0/win-x64/publish/*
- name: Publish - NativeAOT
run: |
VERSION=${{ github.ref_name }}
dotnet publish -p:Version=${VERSION:1} -r win-x64 -f net7.0 -p:PublishAot=true -c debug
- name: Zip - Publish - NativeAOT
run: |
7z a -tzip -mx9 Inveigh-net7.0-win-x64-nativeaot-${{ github.ref_name }}.zip $PWD/Inveigh/bin/debug/net7.0/win-x64/native/*
- name: Release .zip
if: "! startsWith(github.event_name, 'pull_request')"
uses: softprops/action-gh-release@v1
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,25 @@ jobs:
- name: Publish - Trimmed/Single File
run: |
VERSION=${{ github.ref_name }}
dotnet publish -p:Version=${VERSION:1} -r linux-x64 -f net7.0 -p:AssemblyName=inveigh -c release
dotnet publish -p:Version=${VERSION:1} -r osx-x64 -f net7.0 -p:AssemblyName=inveigh -c release
dotnet publish -p:Version=${VERSION:1} -r win-x64 -f net7.0 -c release
dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:Version=${VERSION:1} -r linux-x64 -f net7.0 -p:AssemblyName=inveigh -c release
dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:Version=${VERSION:1} -r osx-x64 -f net7.0 -p:AssemblyName=inveigh -c release
dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:Version=${VERSION:1} -r win-x64 -f net7.0 -c release
- name: Zip - Publish
run: |
tar -czvf Inveigh-net7.0-linux-x64-trimmed-single-${{ github.ref_name }}.tar.gz --directory=$PWD/Inveigh/bin/release/net7.0/linux-x64/publish/ .
tar -czvf Inveigh-net7.0-osx-x64-trimmed-single-${{ github.ref_name }}.tar.gz --directory=$PWD/Inveigh/bin/release/net7.0/osx-x64/publish/ .
7z a -tzip -mx9 Inveigh-net7.0-win-x64-trimmed-single-${{ github.ref_name }}.zip $PWD/Inveigh/bin/release/net7.0/win-x64/publish/*
- name: Publish - NativeAOT
run: |
VERSION=${{ github.ref_name }}
dotnet publish -p:Version=${VERSION:1} -r win-x64 -f net7.0 -p:PublishAot=true -c release
- name: Zip - Publish - NativeAOT
run: |
7z a -tzip -mx9 Inveigh-net7.0-win-x64-nativeaot-${{ github.ref_name }}.zip $PWD/Inveigh/bin/release/net7.0/win-x64/native/Inveigh.exe
- name: Release .zip
uses: softprops/action-gh-release@v1
with:
Expand Down
27 changes: 19 additions & 8 deletions Inveigh/Inveigh.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<OutputType>Exe</OutputType>
<TargetFrameworks>net35;net462;net7.0</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<PublishAot Condition="'$(TargetFramework)' == 'net7.0'">true</PublishAot>
<DisableFody Condition="'$(PublishAot)' == 'true' Or '$(PublishTrimmed)' == 'true'">true</DisableFody>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFrameworks)|$(Platform)'=='Debug|net35|AnyCPU'">
Expand All @@ -21,23 +22,33 @@

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="System.DirectoryServices.Protocols">
<Version>6.0.1</Version>
<Version>7.0.0</Version>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="System.DirectoryServices.Protocols" Version="7.0.0-*" />
<PackageReference Include="System.DirectoryServices.Protocols">
<Version>7.0.0</Version>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Costura.Fody" Version="5.7.0">
<PrivateAssets>all</PrivateAssets>
<!--<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>-->
</PackageReference>
<PackageReference Include="Fody" Version="6.6.3">
<PackageReference Include="Fody" Version="6.6.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>


<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Costura.Fody" Version="5.7.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Fody" Version="6.6.4">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>


</Project>
2 changes: 1 addition & 1 deletion Inveigh/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class Program
public static string netbiosDomain = Environment.UserDomainName;
public static string dnsDomain = "";
public static ulong smb2Session = 5548434740922023936; // todo check
public static string version = "2.0.9";
public static string version = "2.0.10";

static void Main(string[] arguments)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public NetBIOSNSListener(uint ttl)
this.TTL = ttl;
}

public new void Start(IPAddress ipAddress, string replyIP)
public void Start(IPAddress ipAddress, string replyIP)
{
Start(ipAddress, replyIP, 0);
}
Expand Down
8 changes: 4 additions & 4 deletions Inveigh/Protocols/Quiddity/Quiddity/Quiddity.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net35;net462;net6.0</TargetFrameworks>
<TargetFrameworks>net35;net462;net7.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -29,13 +29,13 @@

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="System.DirectoryServices.Protocols">
<Version>6.0.1</Version>
<Version>7.0.0</Version>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="System.DirectoryServices.Protocols">
<Version>6.0.1</Version>
<Version>7.0.0</Version>
</PackageReference>
</ItemGroup>

Expand Down

0 comments on commit a07a71c

Please sign in to comment.