Skip to content

Commit cc3b9f8

Browse files
committed
Attempt to switch to dotnet pack for .NET Framework publish
1 parent 105e6f5 commit cc3b9f8

File tree

2 files changed

+33
-22
lines changed

2 files changed

+33
-22
lines changed

.github/workflows/publish-nuget.yml

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -199,28 +199,17 @@ jobs:
199199
PACKAGE_NAME: NetSparkleUpdater.UI.WinForms.NetCore
200200
INCLUDE_SYMBOLS: true
201201

202-
- name: Build NetSparkle.UI.WinForms.NetFramework in Release
203-
run: |
204-
msbuild ${{ github.workspace }}/src/NetSparkle.UI.WinForms.NetFramework/NetSparkle.UI.WinForms.NetFramework.csproj /property:Configuration=Release /t:Restore /p:OutputPath=../../nuget/winformsnetframework/lib/net462 /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
205-
msbuild ${{ github.workspace }}/src/NetSparkle.UI.WinForms.NetFramework/NetSparkle.UI.WinForms.NetFramework.csproj /property:Configuration=Release /p:OutputPath=../../nuget/winformsnetframework/lib/net462 /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
206-
207-
- name: Setup NetSparkleUpdater.UI.WinForms.NetFramework folder
208-
run: |
209-
del ${{ github.workspace }}/nuget\winformsnetframework\lib\net462\NetSparkle.dll
210-
del ${{ github.workspace }}/nuget\winformsnetframework\lib\net462\NetSparkle.pdb
211-
copy ${{ github.workspace }}/LICENSE.md ${{ github.workspace }}/nuget\winformsnetframework\LICENSE.md
212-
copy ${{ github.workspace }}/README.md ${{ github.workspace }}/nuget\winformsnetframework\README.md
213-
copy ${{ github.workspace }}/src\NetSparkle\ArtWork\software-update-available.png ${{ github.workspace }}/nuget\winformsnetframework\software-update-available.png
214-
215-
# uncomment this and add it to following run if nuget/setup-nuget breaks on windows-latest
216-
# nuget setApiKey ${{secrets.NUGET_API_KEY}}
217-
218-
- name: Publish NetSparkleUpdater.UI.WinForms.NetFramework
219-
run: |
220-
cd ${{ github.workspace }}/nuget/winformsnetframework
221-
nuget pack NetSparkleUpdater.UI.WinForms.NetFramework.nuspec -verbosity detailed -Symbols -SymbolPackageFormat snupkg
222-
nuget push *.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -verbosity detailed
223-
cd ${{ github.workspace }}
202+
- name: Publish NetSparkleUpdater.UI.WinForms.NetFramework on version change
203+
uses: nitz/publish-nuget@60fd3adf9d9eecc3bbf8a98738734d3061347172
204+
with:
205+
PROJECT_FILE_PATH: ${{ github.workspace }}/src/NetSparkle.UI.WinForms.NetFramework/NetSparkle.UI.WinForms.NetFramework.csproj # Relative to repository root
206+
# VERSION_FILE_PATH: Directory.Build.props # Filepath with version info, relative to repository root. Defaults to project file
207+
# VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group
208+
TAG_COMMIT: false # Flag to enable / disalge git tagging
209+
# TAG_FORMAT: v* # Format of the git tag, [*] gets replaced with version
210+
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key
211+
PACKAGE_NAME: NetSparkleUpdater.UI.WinForms.NetFramework
212+
INCLUDE_SYMBOLS: true
224213

225214
- name: Publish NetSparkleUpdater.Tools.DSAHelper
226215
uses: nitz/publish-nuget@60fd3adf9d9eecc3bbf8a98738734d3061347172

src/NetSparkle.UI.WinForms.NetFramework/NetSparkle.UI.WinForms.NetFramework.csproj

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,30 @@
88
<UseWindowsForms>true</UseWindowsForms>
99
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
1010
<Nullable>Enable</Nullable>
11+
<Version>3.0.2-preview20250127001</Version>
1112
<LangVersion>8.0</LangVersion>
13+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
14+
<PackageReadmeFile>README.md</PackageReadmeFile>
15+
<PackageProjectUrl>https://github.com/NetSparkleUpdater/NetSparkle</PackageProjectUrl>
16+
<PackageIcon>software-update-available.png</PackageIcon>
17+
<PackageIconUrl />
18+
<RepositoryUrl>https://github.com/NetSparkleUpdater/NetSparkle.git</RepositoryUrl>
19+
<RepositoryType>git</RepositoryType>
20+
<PackageReleaseNotes>See https://github.com/NetSparkleUpdater/NetSparkle for all information and to file issues/pull requests for and ask questions about this project.</PackageReleaseNotes>
21+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
22+
<PackageId>NetSparkleUpdater.UI.WinForms.NetFramework</PackageId>
23+
<Authors>Deadpikle</Authors>
24+
<Company>Deadpikle</Company>
25+
<Description>NetSparkleUpdater/NetSparkle app updater framework with built-in WinForms UI for .NET 5+. NetSparkle is a C# .NET software update framework that allows you to easily download installer files and update your C# .NET Framework or .NET Core software. Built-in UIs are available for WinForms, WPF, and Avalonia. You provide, somewhere on the internet, an app cast with software version information along with release notes in Markdown or HTML format. The NetSparkle framework then checks for an update in the background, displays the release notes to the user, and lets users download or skip the software update. The framework can also perform silent downloads so that you can present all of the UI yourself or set up your own silent software update system, as allowed by your software architecture. It was inspired by the Sparkle (https://sparkle-project.org/) project for Cocoa developers and the WinSparkle (https://winsparkle.org/) project (a Win32 port).</Description>
1226
</PropertyGroup>
27+
<ItemGroup>
28+
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
29+
<None Include="..\NetSparkle\ArtWork\software-update-available.png" Pack="true" PackagePath="\" />
30+
</ItemGroup>
31+
<PropertyGroup>
32+
<IncludeSymbols>true</IncludeSymbols>
33+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
34+
</PropertyGroup>
1335
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1436
<OutputPath>..\bin\Debug\NetSparkle.UI.WinForms\</OutputPath>
1537
<DocumentationFile>..\bin\Debug\NetSparkle.UI.WinForms\NetSparkleUpdater.UI.WinForms.xml</DocumentationFile>

0 commit comments

Comments
 (0)