Skip to content

Commit 9ba6294

Browse files
committed
feat: Enhance packaging by adding Razor project and README to NuGet output
1 parent f97f521 commit 9ba6294

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

.github/workflows/Release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ jobs:
1919
run: dotnet restore MbSoftLab.TemplateEngine.Core.sln
2020
- name: Build
2121
run: dotnet build MbSoftLab.TemplateEngine.Core.sln --configuration Release --no-restore
22-
- name: Pack
23-
run: dotnet pack MbSoftLab.TemplateEngine.Core/MbSoftLab.TemplateEngine.Core.csproj --configuration Release --no-restore -o ./artifacts
22+
- name: Pack Core and Razor projects
23+
run: |
24+
mkdir artifacts
25+
dotnet pack MbSoftLab.TemplateEngine.Core/MbSoftLab.TemplateEngine.Core.csproj --configuration Release --no-restore -o ./artifacts
26+
dotnet pack MbSoftLab.TemplateEngine.Core.Razor/MbSoftLab.TemplateEngine.Core.Razor.csproj --configuration Release --no-restore -o ./artifacts
2427
- name: Push to NuGet
2528
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

MbSoftLab.TemplateEngine.Core.Razor/MbSoftLab.TemplateEngine.Core.Razor.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1717
<Copyright>© 2021 - 2025 MbSoftLab</Copyright>
1818
<PackageIcon>MbSoftLabLogo.png</PackageIcon>
19+
<PackageReadmeFile>README.md</PackageReadmeFile>
1920
<PackageProjectUrl>https://github.com/mbsoftlab/MbSoftLab.TemplateEngine.Core</PackageProjectUrl>
2021
<RepositoryUrl>https://github.com/mbsoftlab/MbSoftLab.TemplateEngine.Core</RepositoryUrl>
2122
<RepositoryType>Git</RepositoryType>
@@ -32,6 +33,10 @@
3233
<Pack>True</Pack>
3334
<PackagePath></PackagePath>
3435
</None>
36+
<None Include="README.md">
37+
<Pack>True</Pack>
38+
<PackagePath>\</PackagePath>
39+
</None>
3540
</ItemGroup>
3641

3742
</Project>

MbSoftLab.TemplateEngine.Core/MbSoftLab.TemplateEngine.Core.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1818
<Copyright>© 2021 - 2025 MbSoftLab</Copyright>
1919
<PackageIcon>MbSoftLabLogo.png</PackageIcon>
20+
<PackageReadmeFile>README.md</PackageReadmeFile>
2021
<PackageIconUrl />
2122
<PackageProjectUrl>https://github.com/mbsoftlab/MbSoftLab.TemplateEngine.Core</PackageProjectUrl>
2223
<RepositoryUrl>https://github.com/mbsoftlab/MbSoftLab.TemplateEngine.Core</RepositoryUrl>
@@ -28,6 +29,10 @@
2829
<Pack>True</Pack>
2930
<PackagePath></PackagePath>
3031
</None>
32+
<None Include="..\README.md" Link="README.md">
33+
<Pack>True</Pack>
34+
<PackagePath>\</PackagePath>
35+
</None>
3136
</ItemGroup>
3237

3338
<ItemGroup>

0 commit comments

Comments
 (0)