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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GitHub Release Checker
Small Nuget package for getting the finding the latest release on GitHub and comparing a provided version with.
- 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)
- GitHub tags need to match the version (v is removed from the beginning)
- Only the most recent 10 releases are checked
- Built to be used with Dependency Injection
- 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 | Versions 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.
-
net8.0
-
net9.0
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.