diff --git a/.gitignore b/.gitignore
index 25e7868..82742f5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -354,3 +354,5 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
UVtools.Platforms/linux-x64/libcvextern.so
+
+build/nuget_api.key
\ No newline at end of file
diff --git a/README.md b/README.md
index 9a4fa77..6a70b96 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,11 @@
# UVtools
-[](https://github.com/sn4k3/UVtools/blob/master/LICENSE)
-[](https://github.com/sn4k3/UVtools)
-[](https://github.com/sn4k3/UVtools/releases)
-[](https://github.com/sn4k3/UVtools/releases)
+[](https://github.com/sn4k3/UVtools/blob/master/LICENSE)
+[](https://github.com/sn4k3/UVtools)
+[](https://github.com/sn4k3/UVtools)
+[](https://github.com/sn4k3/UVtools/releases)
+[](https://github.com/sn4k3/UVtools/releases)
+[](https://www.nuget.org/packages/UVtools.Core)
**MSLA/DLP, file analysis, calibration, repair, conversion and manipulation**
@@ -408,7 +410,14 @@ There are multiple ways to open your file:
# Library -> Developers
-Are you a developer? This project include a .NET 5.0 library (UVtools.Core) that can be referenced in your application to make use of my work. Easy to use calls that allow you work with the formats. For more information navigate main code.
+Are you a developer?
+This project include a .NET 5.0 library (UVtools.Core) that can be referenced in your application to make use of my work.
+Easy to use calls that allow you work with the formats. For more information navigate main code to see some calls.
+
+Nuget package: https://www.nuget.org/packages/UVtools.Core
+```powershell
+dotnet add package UVtools.Core
+```
## Develop and build from Source
diff --git a/UVtools.Core/UVtools.Core.csproj b/UVtools.Core/UVtools.Core.csproj
index a11e5bd..00fcf9e 100644
--- a/UVtools.Core/UVtools.Core.csproj
+++ b/UVtools.Core/UVtools.Core.csproj
@@ -15,6 +15,8 @@
UVtools.png
AnyCPU;x64
false
+
+ msla, dlp, resin, printer, slicer, 3d printing, image processing, layers
@@ -39,7 +41,7 @@
True
-
+
True
diff --git a/build/CreateRelease.WPF.ps1 b/build/CreateRelease.WPF.ps1
index 9521bea..3a9ef99 100644
--- a/build/CreateRelease.WPF.ps1
+++ b/build/CreateRelease.WPF.ps1
@@ -35,6 +35,7 @@ Set-Location $PSScriptRoot\..
$enableMSI = $true
#$buildOnly = 'linux-x64'
#$buildOnly = 'win-x64'
+$enableNugetPublish = $true
# Profilling
$stopWatch = New-Object -TypeName System.Diagnostics.Stopwatch
$deployStopWatch = New-Object -TypeName System.Diagnostics.Stopwatch
@@ -130,6 +131,29 @@ $runtimes =
#Invoke-WebRequest -Uri $appImageUrl -OutFile $appImageFilePath
#wsl chmod a+x $appImageFilePath
+if($null -ne $enableNugetPublish -and $enableNugetPublish)
+{
+ $nugetApiKeyFile = 'build/nuget_api.key'
+ if (Test-Path -Path $nugetApiKeyFile -PathType Leaf)
+ {
+ Write-Output "Creating nuget package"
+ dotnet pack UVtools.Core --configuration 'Release'
+
+ $nupkg = "UVtools.Core/bin/Release/UVtools.Core.$version.nupkg"
+
+ if (Test-Path -Path $nupkg -PathType Leaf){
+ $nugetApiKeyFile = (Get-Content $nugetApiKeyFile)
+ dotnet nuget push $nupkg --api-key $nugetApiKeyFile --source https://api.nuget.org/v3/index.json
+ #Remove-Item $nupkg
+ }else {
+ Write-Error "Nuget package publish failed!"
+ Write-Error "File '$nupkg' was not found"
+ return
+ }
+ }
+}
+return
+
foreach ($obj in $runtimes.GetEnumerator()) {
if(![string]::IsNullOrWhiteSpace($buildOnly) -and !$buildOnly.Equals($obj.Name)) {continue}
# Configuration
@@ -228,7 +252,7 @@ $stopWatch.Stop()
#>
# MSI Installer for Windows
-if($enableMSI)
+if($null -ne $enableMSI -and $enableMSI)
{
$deployStopWatch.Restart()
$runtime = 'win-x64'