Skip to content

Commit

Permalink
Attempt to switch to dotnet pack for .NET Framework publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Deadpikle committed Jan 26, 2025
1 parent 105e6f5 commit cc3b9f8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 22 deletions.
33 changes: 11 additions & 22 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,28 +199,17 @@ jobs:
PACKAGE_NAME: NetSparkleUpdater.UI.WinForms.NetCore
INCLUDE_SYMBOLS: true

- name: Build NetSparkle.UI.WinForms.NetFramework in Release
run: |
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
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
- name: Setup NetSparkleUpdater.UI.WinForms.NetFramework folder
run: |
del ${{ github.workspace }}/nuget\winformsnetframework\lib\net462\NetSparkle.dll
del ${{ github.workspace }}/nuget\winformsnetframework\lib\net462\NetSparkle.pdb
copy ${{ github.workspace }}/LICENSE.md ${{ github.workspace }}/nuget\winformsnetframework\LICENSE.md
copy ${{ github.workspace }}/README.md ${{ github.workspace }}/nuget\winformsnetframework\README.md
copy ${{ github.workspace }}/src\NetSparkle\ArtWork\software-update-available.png ${{ github.workspace }}/nuget\winformsnetframework\software-update-available.png
# uncomment this and add it to following run if nuget/setup-nuget breaks on windows-latest
# nuget setApiKey ${{secrets.NUGET_API_KEY}}

- name: Publish NetSparkleUpdater.UI.WinForms.NetFramework
run: |
cd ${{ github.workspace }}/nuget/winformsnetframework
nuget pack NetSparkleUpdater.UI.WinForms.NetFramework.nuspec -verbosity detailed -Symbols -SymbolPackageFormat snupkg
nuget push *.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -verbosity detailed
cd ${{ github.workspace }}
- name: Publish NetSparkleUpdater.UI.WinForms.NetFramework on version change
uses: nitz/publish-nuget@60fd3adf9d9eecc3bbf8a98738734d3061347172
with:
PROJECT_FILE_PATH: ${{ github.workspace }}/src/NetSparkle.UI.WinForms.NetFramework/NetSparkle.UI.WinForms.NetFramework.csproj # Relative to repository root
# VERSION_FILE_PATH: Directory.Build.props # Filepath with version info, relative to repository root. Defaults to project file
# VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group
TAG_COMMIT: false # Flag to enable / disalge git tagging
# TAG_FORMAT: v* # Format of the git tag, [*] gets replaced with version
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key
PACKAGE_NAME: NetSparkleUpdater.UI.WinForms.NetFramework
INCLUDE_SYMBOLS: true

- name: Publish NetSparkleUpdater.Tools.DSAHelper
uses: nitz/publish-nuget@60fd3adf9d9eecc3bbf8a98738734d3061347172
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,30 @@
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<Nullable>Enable</Nullable>
<Version>3.0.2-preview20250127001</Version>
<LangVersion>8.0</LangVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/NetSparkleUpdater/NetSparkle</PackageProjectUrl>
<PackageIcon>software-update-available.png</PackageIcon>
<PackageIconUrl />
<RepositoryUrl>https://github.com/NetSparkleUpdater/NetSparkle.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes>See https://github.com/NetSparkleUpdater/NetSparkle for all information and to file issues/pull requests for and ask questions about this project.</PackageReleaseNotes>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>NetSparkleUpdater.UI.WinForms.NetFramework</PackageId>
<Authors>Deadpikle</Authors>
<Company>Deadpikle</Company>
<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>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
<None Include="..\NetSparkle\ArtWork\software-update-available.png" Pack="true" PackagePath="\" />
</ItemGroup>
<PropertyGroup>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>..\bin\Debug\NetSparkle.UI.WinForms\</OutputPath>
<DocumentationFile>..\bin\Debug\NetSparkle.UI.WinForms\NetSparkleUpdater.UI.WinForms.xml</DocumentationFile>
Expand Down

0 comments on commit cc3b9f8

Please sign in to comment.