-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from AikidoSec/github-release-action
Preparing package setup for release + bugfixes
- Loading branch information
Showing
14 changed files
with
241 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Publish NuGet Packages | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
publish: | ||
runs-on: windows-2022 | ||
timeout-minutes: 30 | ||
|
||
env: | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache NuGet packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.nuget/packages | ||
~/.local/share/NuGet/v3-cache | ||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }} | ||
restore-keys: | | ||
${{ runner.os }}-nuget- | ||
- name: Install .NET versions that we need for building the library | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: | | ||
6.0 | ||
7.0 | ||
8.0 | ||
- name: Add msbuild to PATH | ||
uses: microsoft/setup-msbuild@v2 | ||
with: | ||
vs-version: "[17.2,19.0)" | ||
|
||
- name: Install dependencies | ||
run: | | ||
dotnet tool restore | ||
dotnet restore | ||
- name: Install Cake Tool | ||
run: dotnet tool install --global Cake.Tool | ||
|
||
- name: Run Cake Script to Build and Pack | ||
run: dotnet cake build.cake --target=CreatePackages --libVersion=${{ github.ref_name }} | ||
|
||
- name: Publish NuGet Packages | ||
run: | | ||
$ErrorActionPreference = "Stop" | ||
Get-ChildItem -Path artifacts\*.nupkg | ForEach-Object { | ||
try { | ||
dotnet nuget push $_.FullName --api-key ${{ secrets.NUGETAPIKEY }} --source https://api.nuget.org/v3/index.json | ||
Write-Host "Pushed $($_.FullName)" | ||
} catch { | ||
Write-Host "Failed to push $($_.FullName)" | ||
exit 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package > | ||
<metadata> | ||
<id>Aikido.Zen.DotNetCore</id> | ||
<version>*</version> | ||
<title>$title$</title> | ||
<authors>Aikido Security</authors> | ||
<owners>Aikido Security</owners> | ||
<description>Aikido Security Zen .NET Core Firewall</description> | ||
<frameworkReferences> | ||
<group targetFramework="net8.0"> | ||
<frameworkReference name="Microsoft.AspNetCore.App" /> | ||
</group> | ||
<group targetFramework="net7.0"> | ||
<frameworkReference name="Microsoft.AspNetCore.App" /> | ||
</group> | ||
<group targetFramework="net6.0"> | ||
<frameworkReference name="Microsoft.AspNetCore.App" /> | ||
</group> | ||
</frameworkReferences> | ||
<dependencies> | ||
<group targetFramework="net8.0"> | ||
<dependency id="Lib.Harmony" version="2.3.3" /> | ||
<dependency id="Microsoft.AspNetCore.Hosting.Abstractions" version="2.2.0" /> | ||
<dependency id="Microsoft.AspNetCore.Http" version="2.2.2" /> | ||
<dependency id="Microsoft.AspNetCore.Routing" version="2.2.2" /> | ||
<dependency id="Microsoft.AspNetCore.Routing.Abstractions" version="2.2.0" /> | ||
<dependency id="Microsoft.Extensions.DependencyInjection" version="8.0.0" /> | ||
<dependency id="Microsoft.Extensions.Options" version="8.0.0" /> | ||
<dependency id="System.Text.Json" version="8.0.1" /> | ||
</group> | ||
<group targetFramework="net7.0"> | ||
<dependency id="Lib.Harmony" version="2.3.3" /> | ||
<dependency id="Microsoft.AspNetCore.Hosting.Abstractions" version="2.2.0" /> | ||
<dependency id="Microsoft.AspNetCore.Http" version="2.2.2" /> | ||
<dependency id="Microsoft.AspNetCore.Routing" version="2.2.2" /> | ||
<dependency id="Microsoft.AspNetCore.Routing.Abstractions" version="2.2.0" /> | ||
<dependency id="Microsoft.Extensions.DependencyInjection" version="7.0.0" /> | ||
<dependency id="Microsoft.Extensions.Options" version="7.0.0" /> | ||
<dependency id="System.Text.Json" version="7.0.0" /> | ||
</group> | ||
<group targetFramework="net6.0"> | ||
<dependency id="Lib.Harmony" version="2.3.3" /> | ||
<dependency id="Microsoft.AspNetCore.Hosting.Abstractions" version="2.2.0" /> | ||
<dependency id="Microsoft.AspNetCore.Http" version="2.2.2" /> | ||
<dependency id="Microsoft.AspNetCore.Routing" version="2.2.2" /> | ||
<dependency id="Microsoft.AspNetCore.Routing.Abstractions" version="2.2.0" /> | ||
<dependency id="Microsoft.Extensions.DependencyInjection" version="6.0.0" /> | ||
<dependency id="Microsoft.Extensions.Options" version="6.0.0" /> | ||
<dependency id="System.Text.Json" version="6.0.0" /> | ||
</group> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="Aikido.Zen.DotNetCore.targets" target="Build\" /> | ||
<file src="bin\Release\net8.0\Aikido.Zen.Core.dll" target="lib\net8.0" /> | ||
<file src="bin\Release\net7.0\Aikido.Zen.Core.dll" target="lib\net7.0" /> | ||
<file src="bin\Release\net6.0\Aikido.Zen.Core.dll" target="lib\net6.0" /> | ||
<file src="bin\Release\net8.0\Aikido.Zen.DotNetCore.dll" target="lib\net8.0" /> | ||
<file src="bin\Release\net7.0\Aikido.Zen.DotNetCore.dll" target="lib\net7.0" /> | ||
<file src="bin\Release\net6.0\Aikido.Zen.DotNetCore.dll" target="lib\net6.0" /> | ||
<file src="bin\Release\net8.0\libraries\*.*" target="Build\libraries" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<!-- Include all files in the libraries directory to copy to the output directory --> | ||
<None Update="$(MSBuildThisFileDirectory)libraries\**\*.*"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
</ItemGroup> | ||
|
||
<Target Name="CopyLibraries" AfterTargets="Build"> | ||
<ItemGroup> | ||
<!-- Define a new item group for all files in the libraries directory --> | ||
<LibraryFiles Include="$(MSBuildThisFileDirectory)libraries\**\*.*" /> | ||
</ItemGroup> | ||
<Copy SourceFiles="@(LibraryFiles)" DestinationFolder="$(OutputPath)libraries\" /> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 19 additions & 7 deletions
26
Aikido.Zen.DotNetFramework/Aikido.Zen.DotNetFramework.nuspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package > | ||
<metadata> | ||
<id>$id$</id> | ||
<version>$version$</version> | ||
<id>Aikido.Zen.DotNetFramework</id> | ||
<version>*</version> | ||
<title>$title$</title> | ||
<authors>$author$</authors> | ||
<authors>Aikido Security</authors> | ||
<owners>Aikido Security</owners> | ||
<description>Aikido Security Zen .NET Framework Firewall</description> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<license type="expression">MIT</license> | ||
<!-- <icon>icon.png</icon> --> | ||
<projectUrl>http://project_url_here_or_delete_this_line/</projectUrl> | ||
<description>Aikido Zen, An in-app firewall for .NET</description> | ||
<releaseNotes>Summary of changes made in this release of the package.</releaseNotes> | ||
<copyright>Copyright 2024 Aikido</copyright> | ||
<tags>firewall .NET</tags> | ||
<dependencies> | ||
<dependency id="Lib.Harmony" version="[2.3.3,99.99.99)" /> | ||
<dependency id="Microsoft.AspNetCore.Http.Abstractions" version="[2.2.0,99.99.99)" /> | ||
<dependency id="Microsoft.AspNetCore.WebUtilities" version="[2.2.0,99.99.99)" /> | ||
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="[8.0.2,99.99.99)" /> | ||
<dependency id="System.Text.Json" version="[8.0.5,99.99.99)" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="Aikido.Zen.DotNetFramework.targets" target="Build\" /> | ||
<file src="bin\Release\libraries\libzen_internals_x86_64-pc-windows-gnu.dll" target="Build\libraries\" /> | ||
<file src="bin\Release\libraries\libzen_internals_x86_64-pc-windows-gnu.dll.sha256sum" target="Build\libraries\" /> | ||
<file src="bin\Release\Aikido.Zen.Core.dll" target="lib" /> | ||
<file src="bin\Release\Aikido.Zen.DotNetFramework.dll" target="lib" /> | ||
</files> | ||
</package> |
21 changes: 21 additions & 0 deletions
21
Aikido.Zen.DotNetFramework/Aikido.Zen.DotNetFramework.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<!-- Include the DLLs you want to copy to the output directory --> | ||
<None Include="$(MSBuildThisFileDirectory)libraries\libzen_internals_x86_64-pc-windows-gnu.dll"> | ||
<Link>libraries\libzen_internals_x86_64-pc-windows-gnu.dll</Link> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Include="$(MSBuildThisFileDirectory)libraries\libzen_internals_x86_64-pc-windows-gnu.dll.sha256sum"> | ||
<Link>libraries\libzen_internals_x86_64-pc-windows-gnu.dll.sha256sum</Link> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
</ItemGroup> | ||
|
||
<Target Name="CopyLibraries" AfterTargets="Build"> | ||
<ItemGroup> | ||
<!-- Define a new item group for the specific files to copy --> | ||
<LibraryFiles Include="@(None)" Condition="'%(FileName)' == 'libzen_internals_x86_64-pc-windows-gnu'" /> | ||
</ItemGroup> | ||
<Copy SourceFiles="@(LibraryFiles)" DestinationFolder="$(OutputPath)libraries\" /> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.