MattEqualsCoder.GitHubReleaseChecker 1.1.3

dotnet add package MattEqualsCoder.GitHubReleaseChecker --version 1.1.3                
NuGet\Install-Package MattEqualsCoder.GitHubReleaseChecker -Version 1.1.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MattEqualsCoder.GitHubReleaseChecker" Version="1.1.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MattEqualsCoder.GitHubReleaseChecker --version 1.1.3                
#r "nuget: MattEqualsCoder.GitHubReleaseChecker, 1.1.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MattEqualsCoder.GitHubReleaseChecker as a Cake Addin
#addin nuget:?package=MattEqualsCoder.GitHubReleaseChecker&version=1.1.3

// Install MattEqualsCoder.GitHubReleaseChecker as a Cake Tool
#tool nuget:?package=MattEqualsCoder.GitHubReleaseChecker&version=1.1.3                

GitHub Release Checker

Small Nuget package for getting the finding the latest release on GitHub and comparing a provided version with.

  1. Version checking is based on Semantic Versioning
    • It should also work with flexible dot number notations (e.g., 1.2.3.1 will record as newer than 1.2.3 as well as 1.2.3.0)
  2. GitHub tags need to match the version (v is removed from the beginning)
  3. Only the most recent 10 releases are checked
  4. Built to be used with Dependency Injection
  5. It should be compatible with the .net build versioning that includes the git commit
    • Note that if the GitHub tags don't include the git commit in them, then it will treat 1.2.3+hash1 as equal to 1.2.3+hash2

Examples

Adding the services to a project

Host.CreateDefaultBuilder(e.Args)
.ConfigureLogging(...)
.ConfigureServices(services =>
{
    services.AddGitHubReleaseCheckerServices();
})
.Start();

Checking the release

var version = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);

var newerGitHubRelease = _host.Services.GetRequiredService<IGitHubReleaseCheckerService>()
    .GetGitHubReleaseToUpdateToAsync("MattEqualsCoder", "TestRepo", version ?? "", false);

if (newerGitHubRelease != null)
{
    var response = MessageBox.Show("A new update was found! Do you want to go to the release page?", "New Update",
        MessageBoxButton.YesNo);

    if (response == MessageBoxResult.Yes)
    {
        var url = newerGitHubRelease.Url.Replace("&", "^&");
        Process.Start(new ProcessStartInfo(url) { UseShellExecute = true });
    }
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on MattEqualsCoder.GitHubReleaseChecker:

Package Downloads
MattEqualsCoder.MSURandomizer.Avalonia

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.3 61 12/27/2024
1.1.2 1,219 12/22/2023
1.1.1 123 12/22/2023
1.1.0 116 12/22/2023
1.0.0 550 8/1/2023