Skip to content

Commit 5e41b68

Browse files
committed
ci: fix nuget publish
1 parent b4d4d46 commit 5e41b68

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

.github/workflows/nuget-publish.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@ jobs:
3232
} else {
3333
$copyright = "Copyright 2025-$year DearVa"
3434
}
35-
dotnet pack src/Avalonia.LiveMarkdown/Avalonia.LiveMarkdown.csproj --configuration Release --no-build -p:PackageVersion=$version -p:Copyright="$copyright" -o out
35+
dotnet pack src/Avalonia.LiveMarkdown/Avalonia.LiveMarkdown.csproj --configuration Release --no-build -p:PackageVersion=$version -p:Copyright="$copyright" -o ${{ github.workspace }}/out
3636
3737
- name: Publish to NuGet
38-
run: dotnet nuget push out/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
38+
run: |
39+
$pkg = Get-ChildItem "${{ github.workspace }}/out/*.nupkg" | Select-Object -First 1
40+
if ($null -eq $pkg) { throw 'No nupkg found!' }
41+
dotnet nuget push $pkg.FullName --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
3942
env:
4043
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

src/Avalonia.LiveMarkdown/Avalonia.LiveMarkdown.csproj

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
<Title>Avalonia.LiveMarkdown</Title>
55
<Authors>DearVa</Authors>
66
<Description>`Avalonia.LiveMarkdown` is a High-performance Markdown viewer for Avalonia applications.
7-
It supports **real-time rendering** of Markdown content, so it's ideal for applications that require dynamic text updating, **especially when streaming large model outputs**.</Description>
7+
It supports **real-time rendering** of Markdown content, so it's ideal for applications that require dynamic text updating, **especially when streaming large model outputs**.
8+
</Description>
89
<PackageProjectUrl>https://github.com/DearVa/Avalonia.LiveMarkdown</PackageProjectUrl>
9-
<PackageLicenseUrl>https://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
10+
<PackageReadmeFile>README.md</PackageReadmeFile>
11+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
1012
<RepositoryUrl>https://github.com/DearVa/Avalonia.LiveMarkdown</RepositoryUrl>
1113
</PropertyGroup>
1214

@@ -16,8 +18,12 @@ It supports **real-time rendering** of Markdown content, so it's ideal for appli
1618
<PackageReference Include="ColorCode.Core"/>
1719
<PackageReference Include="Markdig"/>
1820
<PackageReference Include="PolySharp">
19-
<PrivateAssets>all</PrivateAssets>
20-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
21+
<PrivateAssets>all</PrivateAssets>
22+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2123
</PackageReference>
2224
</ItemGroup>
25+
26+
<ItemGroup>
27+
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
28+
</ItemGroup>
2329
</Project>

0 commit comments

Comments
 (0)