diff --git a/.github/workflows/release-tracking.yml b/.github/workflows/release-tracking.yml index d9a98de..5d03a95 100644 --- a/.github/workflows/release-tracking.yml +++ b/.github/workflows/release-tracking.yml @@ -1,10 +1,7 @@ -# Workflow to register a new application version with both GitHub Releases and Raygun deployment tracking. +# Workflow to register a new application version as a GitHub Release. # The workflow is triggered when a tag in the format "v1.0.0" is pushed to GitHub. # -# Learn more about Raygun Deployment Tracking at: -# https://raygun.com/documentation/product-guides/deployment-tracking/overview/ -# # Learn more about the GitHub release action at: # https://github.com/marketplace/actions/git-release @@ -26,34 +23,8 @@ jobs: contents: write steps: - - name: Get the version number - id: get_version - run: | - VERSION=${GITHUB_REF_NAME#v} - echo Version: $VERSION - echo "VERSION=$VERSION" >> $GITHUB_OUTPUT - - - name: Send to the Raygun Deployments API - id: raygun_deployment - uses: fjogeleit/http-request-action@551353b829c3646756b2ec2b3694f819d7957495 - with: - url: https://api.raygun.com/v3/applications/api-key/${{ secrets.RAYGUN_APIKEY }}/deployments - method: POST - bearerToken: ${{ secrets.RAYGUN_AUTHTOKEN }} - data: >- - { - "version": "${{ steps.get_version.outputs.VERSION }}", - "ownerName": "${{ github.event.pusher.name }}", - "emailAddress": "${{ github.event.pusher.email }}", - "scmIdentifier": "${{ github.sha }}", - "scmType": "GitHub" - } - - - name: Show Raygun response - run: echo ${{ steps.raygun_deployment.outputs.response }} - - name: Check out repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 - name: Create GitHub Release id: github_release diff --git a/src/Notifications.API/Notifications.API.csproj b/src/Notifications.API/Notifications.API.csproj index 744af63..4a805e2 100644 --- a/src/Notifications.API/Notifications.API.csproj +++ b/src/Notifications.API/Notifications.API.csproj @@ -13,7 +13,6 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Notifications.API/Platform/AppSettings.cs b/src/Notifications.API/Platform/AppSettings.cs index ad6ddca..206b8ce 100644 --- a/src/Notifications.API/Platform/AppSettings.cs +++ b/src/Notifications.API/Platform/AppSettings.cs @@ -7,10 +7,11 @@ internal static class AppSettings public static string? Version { get; private set; } public const string ApiKeys = nameof(ApiKeys); - public static void BindAppSettings(this IServiceCollection services) + public static IServiceCollection BindAppSettings(this IServiceCollection services) { Version = GetVersion(); services.AddOptions>(ApiKeys).BindConfiguration(configSectionPath: ApiKeys); + return services; } private static string GetVersion() diff --git a/src/Notifications.API/Program.cs b/src/Notifications.API/Program.cs index 21206ae..a65853d 100644 --- a/src/Notifications.API/Program.cs +++ b/src/Notifications.API/Program.cs @@ -1,23 +1,13 @@ -using Mindscape.Raygun4Net.AspNetCore; using Notifications.Database; using Notifications.Platform; using ZLogger; var builder = WebApplication.CreateBuilder(args); -builder.Logging.ClearProviders().AddZLoggerConsole(options => -{ - if (builder.Environment.IsDevelopment()) - options.UsePlainTextFormatter(); - else - options.UseJsonFormatter(); -}); -builder.Services.AddRaygun(builder.Configuration); -builder.Services.BindAppSettings(); -builder.Services.AddApiKeyAuthentication(); +builder.Logging.ClearProviders().AddZLoggerConsole(options => options.UseJsonFormatter()); +builder.Services.BindAppSettings().AddApiKeyAuthentication(); builder.ConfigureDatabase(); var app = builder.Build(); -app.UseRaygun(); app.MapEndpoints(); await app.BuildDatabaseAsync(); diff --git a/src/Notifications.API/appsettings.json b/src/Notifications.API/appsettings.json index 004e2a0..6ce0d05 100644 --- a/src/Notifications.API/appsettings.json +++ b/src/Notifications.API/appsettings.json @@ -6,9 +6,6 @@ "client-api-key-1", "client-api-key-2" ], - "RaygunSettings": { - "ApiKey": "" - }, "Logging": { "LogLevel": { "Default": "Information",