Skip to content

Commit

Permalink
Feat: dotnet 7 (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGurney authored Jul 27, 2023
1 parent 634fce3 commit a43f6a9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build linux x64
run: dotnet publish -c Release --self-contained -r linux-x64 -o packages/linux/amd64 -p:PublishSingleFile=true -p:PublishTrimmed=true -p:InvariantGlobalization=true -p:DebugType=None -p:DebugSymbols=false -p:VersionSuffix=pr$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
run: dotnet publish -c Release --self-contained -r linux-x64 -o packages/linux/amd64 -p:PublishSingleFile=true -p:PublishTrimmed=partial -p:InvariantGlobalization=true -p:DebugType=None -p:DebugSymbols=false -p:VersionSuffix=pr$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
- name: Build linux arm
run: dotnet publish -c Release --self-contained -r linux-arm64 -o packages/linux/arm64 -p:PublishSingleFile=true -p:PublishTrimmed=true -p:InvariantGlobalization=true -p:DebugType=None -p:DebugSymbols=false -p:DebugSymbols=false -p:VersionSuffix=pr$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
run: dotnet publish -c Release --self-contained -r linux-arm64 -o packages/linux/arm64 -p:PublishSingleFile=true -p:PublishTrimmed=partial -p:InvariantGlobalization=true -p:DebugType=None -p:DebugSymbols=false -p:DebugSymbols=false -p:VersionSuffix=pr$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
Expand Down Expand Up @@ -63,12 +63,12 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build windows x64
shell: bash
run: dotnet publish -c Release --self-contained -r win-x64 -o packages/windows/x64 -p:PublishSingleFile=true -p:PublishTrimmed=true -p:InvariantGlobalization=true -p:DebugType=None -p:DebugSymbols=false -p:VersionSuffix=pr$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
run: dotnet publish -c Release --self-contained -r win-x64 -o packages/windows/x64 -p:PublishSingleFile=true -p:PublishTrimmed=partial -p:InvariantGlobalization=true -p:DebugType=None -p:DebugSymbols=false -p:VersionSuffix=pr$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
- name: Install signing tool
run: dotnet tool install --global AzureSignTool --version 3.0.0
- name: Digitally sign executable
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build linux x64
run: dotnet publish -c Release --self-contained -r linux-x64 -o packages/linux/amd64 -p:PublishSingleFile=true -p:PublishTrimmed=true -p:InvariantGlobalization=true -p:DebugType=None -p:DebugSymbols=false -p:Version=${{ needs.create-release.outputs.release_version }}
run: dotnet publish -c Release --self-contained -r linux-x64 -o packages/linux/amd64 -p:PublishSingleFile=true -p:PublishTrimmed=partial -p:InvariantGlobalization=true -p:DebugType=None -p:DebugSymbols=false -p:Version=${{ needs.create-release.outputs.release_version }}
- name: Build linux arm
run: dotnet publish -c Release --self-contained -r linux-arm64 -o packages/linux/arm64 -p:PublishSingleFile=true -p:PublishTrimmed=true -p:InvariantGlobalization=true -p:DebugType=None -p:DebugSymbols=false -p:Version=${{ needs.create-release.outputs.release_version }}
run: dotnet publish -c Release --self-contained -r linux-arm64 -o packages/linux/arm64 -p:PublishSingleFile=true -p:PublishTrimmed=partial -p:InvariantGlobalization=true -p:DebugType=None -p:DebugSymbols=false -p:Version=${{ needs.create-release.outputs.release_version }}
- name: Login to DockerHub
uses: docker/login-action@v1
with:
Expand Down Expand Up @@ -89,11 +89,11 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build windows x64
run: dotnet publish -c Release --self-contained -r win-x64 -o packages\windows\x64 -p:PublishSingleFile=true -p:PublishTrimmed=true -p:InvariantGlobalization=true -p:DebugType=None -p:DebugSymbols=false -p:Version=${{ needs.create-release.outputs.release_version }}
run: dotnet publish -c Release --self-contained -r win-x64 -o packages\windows\x64 -p:PublishSingleFile=true -p:PublishTrimmed=partial -p:InvariantGlobalization=true -p:DebugType=None -p:DebugSymbols=false -p:Version=${{ needs.create-release.outputs.release_version }}
- name: Install signing tool
run: dotnet tool install --global AzureSignTool --version 3.0.0
- name: Digitally sign executable
Expand Down
2 changes: 2 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Diagnostics.CodeAnalysis;

namespace SMBeagle
{
class Program
{
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(Options))]
static void Main(string[] args)
{
var parser = new Parser(with => with.HelpWriter = null);
Expand Down
17 changes: 13 additions & 4 deletions SMBeagle.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,33 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<VersionPrefix>2.2.1</VersionPrefix>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<WarningLevel>3</WarningLevel>
</PropertyGroup>

<ItemGroup>
<Compile Remove="tests\SMBeagle-Tests\**" />
<Compile Remove="tests\x64\**" />
<EmbeddedResource Remove="tests\SMBeagle-Tests\**" />
<EmbeddedResource Remove="tests\x64\**" />
<None Remove="tests\SMBeagle-Tests\**" />
<None Remove="tests\x64\**" />
</ItemGroup>

<ItemGroup>
<None Remove="LICENSE" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="IPNetwork2" Version="2.5.318" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="8.4.1" />
<PackageReference Include="SMBLibrary" Version="1.4.8" />
<PackageReference Include="Serilog" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="9.0.3" />
<PackageReference Include="SMBLibrary" Version="1.5.0" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
</ItemGroup>

Expand Down

0 comments on commit a43f6a9

Please sign in to comment.