-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#2) update scripts [pack-all-force]
- Loading branch information
1 parent
e374064
commit fcdbdbd
Showing
28 changed files
with
6,342 additions
and
2 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,35 @@ | ||
#!/bin/bash | ||
|
||
echo "Executing post-success scripts for branch $GITHUB_REF_NAME" | ||
echo "Starting build and NuGet package creation for Nuar framework..." | ||
|
||
cd src/Nuar.Host/src/Nuar.Host | ||
|
||
echo "Restoring NuGet packages..." | ||
dotnet restore | ||
|
||
PACKAGE_VERSION="1.0.$GITHUB_RUN_NUMBER" | ||
echo "Building and packing the Paralax library..." | ||
dotnet pack -c release /p:PackageVersion=$PACKAGE_VERSION --no-restore -o ./nupkg | ||
|
||
PACKAGE_PATH="./nupkg/Nuar.Host.$PACKAGE_VERSION.nupkg" | ||
|
||
if [ -f "$PACKAGE_PATH" ]; then | ||
echo "Checking if the package is already signed..." | ||
if dotnet nuget verify "$PACKAGE_PATH" | grep -q 'Package is signed'; then | ||
echo "Package is already signed, skipping signing." | ||
else | ||
echo "Signing the NuGet package..." | ||
dotnet nuget sign "$PACKAGE_PATH" \ | ||
--certificate-path "$CERTIFICATE_PATH" \ | ||
--timestamper http://timestamp.digicert.com | ||
fi | ||
|
||
echo "Uploading Nuar.Host package to NuGet..." | ||
dotnet nuget push "$PACKAGE_PATH" -k "$NUGET_API_KEY" \ | ||
-s https://api.nuget.org/v3/index.json --skip-duplicate | ||
echo "Package uploaded to NuGet." | ||
else | ||
echo "Error: Package $PACKAGE_PATH not found." | ||
exit 1 | ||
fi |
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,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net9.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="3.1.0" /> | ||
<PackageReference Include="Nuar" Version="1.0.5" /> | ||
</ItemGroup> | ||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.5.002.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nuar.Host", "Nuar.Host.csproj", "{05C3147D-F8B7-4C73-80F5-CE6866D90ECD}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{05C3147D-F8B7-4C73-80F5-CE6866D90ECD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{05C3147D-F8B7-4C73-80F5-CE6866D90ECD}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{05C3147D-F8B7-4C73-80F5-CE6866D90ECD}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{05C3147D-F8B7-4C73-80F5-CE6866D90ECD}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {589BB9B3-EB14-4121-9C0C-3D7ED41DD7D8} | ||
EndGlobalSection | ||
EndGlobal |
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,29 @@ | ||
using System.Diagnostics.CodeAnalysis; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.Hosting; | ||
|
||
namespace Nuar.Host | ||
{ | ||
[ExcludeFromCodeCoverage] | ||
public static class Program | ||
{ | ||
public static Task Main(string[] args) | ||
=> CreateHostBuilder(args).Build().RunAsync(); | ||
|
||
public static IHostBuilder CreateHostBuilder(string[] args) => | ||
Microsoft.Extensions.Hosting.Host.CreateDefaultBuilder(args) | ||
.ConfigureWebHostDefaults(webBuilder => | ||
{ | ||
webBuilder.ConfigureAppConfiguration(builder => | ||
{ | ||
var configPath = args?.FirstOrDefault() ?? "nuar.yml"; | ||
builder.AddYamlFile(configPath, false); | ||
}) | ||
.ConfigureServices(services => services.AddNuar()) | ||
.Configure(app => app.UseNuar()); | ||
}); | ||
} | ||
} |
Oops, something went wrong.