Skip to content

Commit

Permalink
Update package scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sn4k3 committed Dec 18, 2024
1 parent fbeb05e commit a13d23c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ If you downloaded the **.AppImage** package variant you must set run permissions
## Mac
1. macOS 10.15 Catalina or higher
1. macOS 13 Monterey or higher
1. 8GB RAM or higher + 512MB per CPU core
3. Install UVtools via the [auto installer](https://github.com/sn4k3/UVtools#to-auto-install-on-macos)
Expand Down
1 change: 1 addition & 0 deletions UVtools.AvaloniaControls/UVtools.AvaloniaControls.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework></TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<Title>UVtools Avalonia Controls</Title>
<Description>AvaloniaUI Controls
Expand Down
6 changes: 3 additions & 3 deletions build/package-manager/nugetPublish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Set-Location $PSScriptRoot\..\..
# Variables
$package = "UVtools.Core"
$nugetApiKeyFile = 'build/secret/nuget_api.key'
$outputFolder = "$package/bin/Release"
$outputFolder = "artifacts/package/release"

$projectXml = [Xml] (Get-Content "$package\$package.csproj")
$version = "$($projectXml.Project.PropertyGroup.Version)".Trim();
$projectXml = [Xml] (Get-Content "Directory.Build.props")
$version = "$($projectXml.Project.PropertyGroup.UVtoolsVersion)".Trim();
if([string]::IsNullOrWhiteSpace($version)){
Write-Error "Can not detect the $package version, does $project\$project.csproj exists?"
exit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Set-Location $PSScriptRoot\..\..
# Variables
$package = "UVtools.AvaloniaControls"
$nugetApiKeyFile = 'build/secret/nuget_api.key'
$outputFolder = "$package/bin/Release"
$githubApiKeyFile = 'build/secret/github_packages.key'
$outputFolder = "artifacts/package/release"

$projectXml = [Xml] (Get-Content "$package\$package.csproj")
$version = "$($projectXml.Project.PropertyGroup.Version)".Trim();
Expand All @@ -24,7 +25,9 @@ if (Test-Path -Path $nugetApiKeyFile -PathType Leaf)

if (Test-Path -Path $nupkg -PathType Leaf){
$nugetApiKeyFile = (Get-Content $nugetApiKeyFile)
$githubApiKeyFile = (Get-Content $githubApiKeyFile)
dotnet nuget push $nupkg --api-key $nugetApiKeyFile --source https://api.nuget.org/v3/index.json --skip-duplicate
#dotnet nuget push $nupkg --api-key $githubApiKeyFile --source https://nuget.pkg.github.com/sn4k3/UVtools/index.json --skip-duplicate
#Remove-Item $nupkg
}else {
Write-Error "Nuget package publish failed!"
Expand Down

0 comments on commit a13d23c

Please sign in to comment.