From a8c78ea2ad8197a4bf69fb76aeb4adeebb430cf7 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Fri, 15 Nov 2024 13:57:16 -0800 Subject: [PATCH 1/7] chore: Migrate to release please. --- .github/actions/build-docs/action.yml | 21 + .github/actions/ci/action.yml | 27 + .github/actions/publish-docs/action.yml | 15 + .github/actions/release-build/action.yml | 18 + .github/workflows/ci.yml | 9 +- .github/workflows/publish.yml | 59 +++ .github/workflows/release-please.yml | 33 ++ .ldrelease/config.yml | 23 - .release-please-manifest.json | 3 + api/.manifest | 5 + ...aunchDarkly.Logging.LdMicrosoftLogging.yml | 461 ++++++++++++++++++ api/LaunchDarkly.Logging.yml | 23 + api/toc.yml | 8 + docfx.json | 48 ++ docs-src/index.md => index.md | 0 release-please-config.json | 8 + 16 files changed, 733 insertions(+), 28 deletions(-) create mode 100644 .github/actions/build-docs/action.yml create mode 100644 .github/actions/ci/action.yml create mode 100644 .github/actions/publish-docs/action.yml create mode 100644 .github/actions/release-build/action.yml create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/release-please.yml delete mode 100644 .ldrelease/config.yml create mode 100644 .release-please-manifest.json create mode 100644 api/.manifest create mode 100644 api/LaunchDarkly.Logging.LdMicrosoftLogging.yml create mode 100644 api/LaunchDarkly.Logging.yml create mode 100644 api/toc.yml create mode 100644 docfx.json rename docs-src/index.md => index.md (100%) create mode 100644 release-please-config.json diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml new file mode 100644 index 0000000..f94fd61 --- /dev/null +++ b/.github/actions/build-docs/action.yml @@ -0,0 +1,21 @@ +name: Build Documentation +description: 'Build Documentation.' + +runs: + using: composite + steps: + - name: Setup dotnet build tools + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0 + - name: Install docfx + shell: bash + run: dotnet tool update -g docfx + + # Note: in the docfx.json file, the 'Configuration' property is set to Debug so that we don't require + # signing to happen just to build docs. + - name: Build docs + shell: bash + run: | + docfx metadata + docfx build diff --git a/.github/actions/ci/action.yml b/.github/actions/ci/action.yml new file mode 100644 index 0000000..6fb32f5 --- /dev/null +++ b/.github/actions/ci/action.yml @@ -0,0 +1,27 @@ +name: CI +description: Runs CI for the .NET Server SDK +inputs: + sdk: + description: 'The dotnet SDK to use.' + required: false + default: '9' + target_test_framework: + description: 'The target test framework to use.' + required: false + default: 'net9.0' + +runs: + using: composite + steps: + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ inputs.sdk }} + - run: dotnet restore src/LaunchDarkly.Logging.Microsoft + env: + BUILDFRAMEWORKS: netstandard2.1 + TESTFRAMEWORK: ${{ inputs.target_test_framework }} + shell: bash + - run: dotnet build src/LaunchDarkly.Logging.Microsoft + shell: bash + - run: dotnet test test/LaunchDarkly.Logging.Microsoft.Tests + shell: bash diff --git a/.github/actions/publish-docs/action.yml b/.github/actions/publish-docs/action.yml new file mode 100644 index 0000000..1a8e726 --- /dev/null +++ b/.github/actions/publish-docs/action.yml @@ -0,0 +1,15 @@ +name: Publish Documentation +description: 'Publish the documentation to Github pages' +inputs: + token: + description: 'Token to use for publishing.' + required: true + +runs: + using: composite + steps: + - uses: launchdarkly/gh-actions/actions/publish-pages@publish-pages-v1.0.2 + name: 'Publish to Github pages' + with: + docs_path: docs + github_token: ${{ inputs.token }} diff --git a/.github/actions/release-build/action.yml b/.github/actions/release-build/action.yml new file mode 100644 index 0000000..34818cb --- /dev/null +++ b/.github/actions/release-build/action.yml @@ -0,0 +1,18 @@ +name: Release Build +description: 'Build in Release Configuration' + +runs: + using: composite + steps: + - name: Setup dotnet build tools + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0 + + - name: Restore Packages + shell: bash + run: dotnet restore + + - name: Build + shell: bash + run: dotnet build /p:Configuration=Release ./src/LaunchDarkly.Logging.Microsoft/LaunchDarkly.Logging.Microsoft.csproj diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 848c8e6..ec95112 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,7 @@ on: branches: [main, 'feat/**'] paths-ignore: - '**.md' + workflow_call: jobs: build-test-linux: @@ -23,9 +24,7 @@ jobs: TESTFRAMEWORK: ${{ matrix.dotnet.test-framework }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v4 + - uses: ./github/actions/ci with: - dotnet-version: ${{ matrix.dotnet.sdk }} - - run: dotnet restore src/LaunchDarkly.Logging.Microsoft - - run: dotnet build src/LaunchDarkly.Logging.Microsoft - - run: dotnet test test/LaunchDarkly.Logging.Microsoft.Tests + sdk: ${{ matrix.dotnet.sdk }} + target_test_framework: ${{ matrix.dotnet.test-framework }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..09d536c --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,59 @@ +name: Publish Package + +on: + workflow_dispatch: + inputs: + dry_run: + description: 'Is this a dry run. If so no package will be published.' + type: boolean + required: true + workflow_call: + inputs: + dry_run: + description: 'Is this a dry run. If so no package will be published.' + type: boolean + required: true + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + id-token: write # Needed if using OIDC to get release secrets. + contents: write # Contents and pull-requests are for release-please to make releases. + pull-requests: write + + steps: + # - uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0 + # if: ${{ needs.release-please.outputs.releases_created == 'true' }} + # name: Get secrets + # with: + # aws_assume_role: ${{ inputs.aws_role }} + # ssm_parameter_pairs: '/production/common/releasing/digicert/host = DIGICERT_HOST, + # /production/common/releasing/digicert/api_key = DIGICERT_API_KEY, + # /production/common/releasing/digicert/client_cert_file_b64 = DIGICERT_CLIENT_CERT_FILE_B64, + # /production/common/releasing/digicert/client_cert_password = DIGICERT_CLIENT_CERT_PASSWORD, + # /production/common/releasing/digicert/code_signing_cert_sha1_hash = DIGICERT_CODE_SIGNING_CERT_SHA1_HASH, + # /production/common/releasing/nuget/api_key = NUGET_API_KEY' + # s3_path_pairs: 'launchdarkly-releaser/dotnet/LaunchDarkly.snk = LaunchDarkly.snk' + + - name: Build Release + uses: ./.github/actions/build-release + + - name: Build Documentation + uses: ./.github/actions/build-docs + + - name: Sign DLLs + uses: launchdarkly/gh-actions/actions/sign-dlls@sign-dlls-v1.0.0 + with: + build_configuration_path: ./src/LaunchDarkly.Logging.Microsoft/bin/Release + dll_name: LaunchDarkly.Logging.Microsoft.dll + + - name: Publish Nupkg + uses: ./.github/actions/publish + with: + dry_run: ${{ inputs.dry_run }} + + - name: Publish Documentation + uses: ./.github/actions/publish-docs + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..62ac5ff --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,33 @@ +name: Release Please + +on: + push: + branches: + - main + +jobs: + release-please: + runs-on: ubuntu-latest + permissions: + id-token: write # Needed if using OIDC to get release secrets. + contents: write # Contents and pull-requests are for release-please to make releases. + pull-requests: write + + steps: + - uses: google-github-actions/release-please-action@v4 + id: release + with: + command: manifest + token: ${{secrets.GITHUB_TOKEN}} + default-branch: main + + ci: + needs: ['release-please'] + if: ${{ needs.release-please.outputs.releases_created == 'true' }} + uses: ./.github/workflows/ci.yml + publish: + needs: ['release-please'] + if: ${{ needs.release-please.outputs.releases_created == 'true' }} + uses: ./.github/workflows/publish + with: + dry_run: false diff --git a/.ldrelease/config.yml b/.ldrelease/config.yml deleted file mode 100644 index 2413593..0000000 --- a/.ldrelease/config.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: 2 - -publications: - - url: https://nuget.org/packages/LaunchDarkly.Logging.Microsoft - description: NuGet - -jobs: - - docker: - image: ldcircleci/dotnet6-release:1 - template: - name: dotnet-linux - env: - TESTFRAMEWORK: net6.0 - LD_RELEASE_DOCS_TARGET_FRAMEWORK: netstandard2.1 - -documentation: - title: LaunchDarkly Logging API for .NET - Microsoft.Extensions.Logging Adapter - gitHubPages: true - -branches: - - name: main - - name: 2.x - - name: 1.x diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..ada7355 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "3.1.0" +} diff --git a/api/.manifest b/api/.manifest new file mode 100644 index 0000000..7d49459 --- /dev/null +++ b/api/.manifest @@ -0,0 +1,5 @@ +{ + "LaunchDarkly.Logging": "LaunchDarkly.Logging.yml", + "LaunchDarkly.Logging.LdMicrosoftLogging": "LaunchDarkly.Logging.LdMicrosoftLogging.yml", + "LaunchDarkly.Logging.LdMicrosoftLogging.Adapter(Microsoft.Extensions.Logging.ILoggerFactory)": "LaunchDarkly.Logging.LdMicrosoftLogging.yml" +} \ No newline at end of file diff --git a/api/LaunchDarkly.Logging.LdMicrosoftLogging.yml b/api/LaunchDarkly.Logging.LdMicrosoftLogging.yml new file mode 100644 index 0000000..d37e891 --- /dev/null +++ b/api/LaunchDarkly.Logging.LdMicrosoftLogging.yml @@ -0,0 +1,461 @@ +### YamlMime:ManagedReference +items: +- uid: LaunchDarkly.Logging.LdMicrosoftLogging + commentId: T:LaunchDarkly.Logging.LdMicrosoftLogging + id: LdMicrosoftLogging + parent: LaunchDarkly.Logging + children: + - LaunchDarkly.Logging.LdMicrosoftLogging.Adapter(Microsoft.Extensions.Logging.ILoggerFactory) + langs: + - csharp + - vb + name: LdMicrosoftLogging + nameWithType: LdMicrosoftLogging + fullName: LaunchDarkly.Logging.LdMicrosoftLogging + type: Class + source: + remote: + path: src/LaunchDarkly.Logging.Microsoft/LdMicrosoftLogging.cs + branch: rlamb/migrate-to-release-please + repo: git@github.com:launchdarkly/dotnet-logging-adapter-ms.git + id: LdMicrosoftLogging + path: src/LaunchDarkly.Logging.Microsoft/LdMicrosoftLogging.cs + startLine: 8 + assemblies: + - LaunchDarkly.Logging.Microsoft + namespace: LaunchDarkly.Logging + summary: >- + Provides integration between the LaunchDarkly SDK's logging framework and + + the Microsoft.Extensions.Logging API. + example: [] + syntax: + content: public static class LdMicrosoftLogging + content.vb: Public Module LdMicrosoftLogging + inheritance: + - System.Object + inheritedMembers: + - System.Object.Equals(System.Object) + - System.Object.Equals(System.Object,System.Object) + - System.Object.GetHashCode + - System.Object.GetType + - System.Object.MemberwiseClone + - System.Object.ReferenceEquals(System.Object,System.Object) + - System.Object.ToString +- uid: LaunchDarkly.Logging.LdMicrosoftLogging.Adapter(Microsoft.Extensions.Logging.ILoggerFactory) + commentId: M:LaunchDarkly.Logging.LdMicrosoftLogging.Adapter(Microsoft.Extensions.Logging.ILoggerFactory) + id: Adapter(Microsoft.Extensions.Logging.ILoggerFactory) + parent: LaunchDarkly.Logging.LdMicrosoftLogging + langs: + - csharp + - vb + name: Adapter(ILoggerFactory) + nameWithType: LdMicrosoftLogging.Adapter(ILoggerFactory) + fullName: LaunchDarkly.Logging.LdMicrosoftLogging.Adapter(Microsoft.Extensions.Logging.ILoggerFactory) + type: Method + source: + remote: + path: src/LaunchDarkly.Logging.Microsoft/LdMicrosoftLogging.cs + branch: rlamb/migrate-to-release-please + repo: git@github.com:launchdarkly/dotnet-logging-adapter-ms.git + id: Adapter + path: src/LaunchDarkly.Logging.Microsoft/LdMicrosoftLogging.cs + startLine: 32 + assemblies: + - LaunchDarkly.Logging.Microsoft + namespace: LaunchDarkly.Logging + summary: A logging implementation that delegates to the Microsoft.Extensions.Logging framework. + remarks: >- +

+ + This method is only available when your target framework is .NET Core. It causes + + the LaunchDarkly.Logging APIs to delegate to the Microsoft.Extensions.Logging + + framework. The ILoggerFactory is the main configuration object for + + Microsoft.Extensions.Logging; application code can construct it programmatically, + + or can obtain it by dependency injection. For more information, see + + Logging + + in .NET Core and ASP.NET Core. + +

+ +

+ + The Microsoft.Extensions.Logging framework has its own mechanisms for filtering log + + output by level or other criteria. If you add a level filter with + + , it will filter + + out messages below that level before they reach the Microsoft logger. + +

+ example: [] + syntax: + content: public static ILogAdapter Adapter(ILoggerFactory loggerFactory) + parameters: + - id: loggerFactory + type: Microsoft.Extensions.Logging.ILoggerFactory + description: the factory object for Microsoft logging + return: + type: LaunchDarkly.Logging.ILogAdapter + description: a logging adapter + content.vb: Public Shared Function Adapter(loggerFactory As ILoggerFactory) As ILogAdapter + overload: LaunchDarkly.Logging.LdMicrosoftLogging.Adapter* +references: +- uid: LaunchDarkly.Logging + commentId: N:LaunchDarkly.Logging + href: LaunchDarkly.html + name: LaunchDarkly.Logging + nameWithType: LaunchDarkly.Logging + fullName: LaunchDarkly.Logging + spec.csharp: + - uid: LaunchDarkly + name: LaunchDarkly + href: LaunchDarkly.html + - name: . + - uid: LaunchDarkly.Logging + name: Logging + href: LaunchDarkly.Logging.html + spec.vb: + - uid: LaunchDarkly + name: LaunchDarkly + href: LaunchDarkly.html + - name: . + - uid: LaunchDarkly.Logging + name: Logging + href: LaunchDarkly.Logging.html +- uid: System.Object + commentId: T:System.Object + parent: System + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object + name: object + nameWithType: object + fullName: object + nameWithType.vb: Object + fullName.vb: Object + name.vb: Object +- uid: System.Object.Equals(System.Object) + commentId: M:System.Object.Equals(System.Object) + parent: System.Object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object) + name: Equals(object) + nameWithType: object.Equals(object) + fullName: object.Equals(object) + nameWithType.vb: Object.Equals(Object) + fullName.vb: Object.Equals(Object) + name.vb: Equals(Object) + spec.csharp: + - uid: System.Object.Equals(System.Object) + name: Equals + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object) + - name: ( + - uid: System.Object + name: object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object + - name: ) + spec.vb: + - uid: System.Object.Equals(System.Object) + name: Equals + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object) + - name: ( + - uid: System.Object + name: Object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object + - name: ) +- uid: System.Object.Equals(System.Object,System.Object) + commentId: M:System.Object.Equals(System.Object,System.Object) + parent: System.Object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object) + name: Equals(object, object) + nameWithType: object.Equals(object, object) + fullName: object.Equals(object, object) + nameWithType.vb: Object.Equals(Object, Object) + fullName.vb: Object.Equals(Object, Object) + name.vb: Equals(Object, Object) + spec.csharp: + - uid: System.Object.Equals(System.Object,System.Object) + name: Equals + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object) + - name: ( + - uid: System.Object + name: object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object + - name: ',' + - name: " " + - uid: System.Object + name: object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object + - name: ) + spec.vb: + - uid: System.Object.Equals(System.Object,System.Object) + name: Equals + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object) + - name: ( + - uid: System.Object + name: Object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object + - name: ',' + - name: " " + - uid: System.Object + name: Object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object + - name: ) +- uid: System.Object.GetHashCode + commentId: M:System.Object.GetHashCode + parent: System.Object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.gethashcode + name: GetHashCode() + nameWithType: object.GetHashCode() + fullName: object.GetHashCode() + nameWithType.vb: Object.GetHashCode() + fullName.vb: Object.GetHashCode() + spec.csharp: + - uid: System.Object.GetHashCode + name: GetHashCode + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.gethashcode + - name: ( + - name: ) + spec.vb: + - uid: System.Object.GetHashCode + name: GetHashCode + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.gethashcode + - name: ( + - name: ) +- uid: System.Object.GetType + commentId: M:System.Object.GetType + parent: System.Object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.gettype + name: GetType() + nameWithType: object.GetType() + fullName: object.GetType() + nameWithType.vb: Object.GetType() + fullName.vb: Object.GetType() + spec.csharp: + - uid: System.Object.GetType + name: GetType + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.gettype + - name: ( + - name: ) + spec.vb: + - uid: System.Object.GetType + name: GetType + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.gettype + - name: ( + - name: ) +- uid: System.Object.MemberwiseClone + commentId: M:System.Object.MemberwiseClone + parent: System.Object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone + name: MemberwiseClone() + nameWithType: object.MemberwiseClone() + fullName: object.MemberwiseClone() + nameWithType.vb: Object.MemberwiseClone() + fullName.vb: Object.MemberwiseClone() + spec.csharp: + - uid: System.Object.MemberwiseClone + name: MemberwiseClone + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone + - name: ( + - name: ) + spec.vb: + - uid: System.Object.MemberwiseClone + name: MemberwiseClone + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone + - name: ( + - name: ) +- uid: System.Object.ReferenceEquals(System.Object,System.Object) + commentId: M:System.Object.ReferenceEquals(System.Object,System.Object) + parent: System.Object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.referenceequals + name: ReferenceEquals(object, object) + nameWithType: object.ReferenceEquals(object, object) + fullName: object.ReferenceEquals(object, object) + nameWithType.vb: Object.ReferenceEquals(Object, Object) + fullName.vb: Object.ReferenceEquals(Object, Object) + name.vb: ReferenceEquals(Object, Object) + spec.csharp: + - uid: System.Object.ReferenceEquals(System.Object,System.Object) + name: ReferenceEquals + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.referenceequals + - name: ( + - uid: System.Object + name: object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object + - name: ',' + - name: " " + - uid: System.Object + name: object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object + - name: ) + spec.vb: + - uid: System.Object.ReferenceEquals(System.Object,System.Object) + name: ReferenceEquals + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.referenceequals + - name: ( + - uid: System.Object + name: Object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object + - name: ',' + - name: " " + - uid: System.Object + name: Object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object + - name: ) +- uid: System.Object.ToString + commentId: M:System.Object.ToString + parent: System.Object + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.tostring + name: ToString() + nameWithType: object.ToString() + fullName: object.ToString() + nameWithType.vb: Object.ToString() + fullName.vb: Object.ToString() + spec.csharp: + - uid: System.Object.ToString + name: ToString + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.tostring + - name: ( + - name: ) + spec.vb: + - uid: System.Object.ToString + name: ToString + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system.object.tostring + - name: ( + - name: ) +- uid: System + commentId: N:System + isExternal: true + href: https://learn.microsoft.com/dotnet/api/system + name: System + nameWithType: System + fullName: System +- uid: LaunchDarkly.Logging.ILogAdapterExtensions.Level(LaunchDarkly.Logging.ILogAdapter,LaunchDarkly.Logging.LogLevel) + commentId: M:LaunchDarkly.Logging.ILogAdapterExtensions.Level(LaunchDarkly.Logging.ILogAdapter,LaunchDarkly.Logging.LogLevel) + isExternal: true + name: Level(ILogAdapter, LogLevel) + nameWithType: ILogAdapterExtensions.Level(ILogAdapter, LogLevel) + fullName: LaunchDarkly.Logging.ILogAdapterExtensions.Level(LaunchDarkly.Logging.ILogAdapter, LaunchDarkly.Logging.LogLevel) + spec.csharp: + - uid: LaunchDarkly.Logging.ILogAdapterExtensions.Level(LaunchDarkly.Logging.ILogAdapter,LaunchDarkly.Logging.LogLevel) + name: Level + isExternal: true + - name: ( + - uid: LaunchDarkly.Logging.ILogAdapter + name: ILogAdapter + isExternal: true + - name: ',' + - name: " " + - uid: LaunchDarkly.Logging.LogLevel + name: LogLevel + isExternal: true + - name: ) + spec.vb: + - uid: LaunchDarkly.Logging.ILogAdapterExtensions.Level(LaunchDarkly.Logging.ILogAdapter,LaunchDarkly.Logging.LogLevel) + name: Level + isExternal: true + - name: ( + - uid: LaunchDarkly.Logging.ILogAdapter + name: ILogAdapter + isExternal: true + - name: ',' + - name: " " + - uid: LaunchDarkly.Logging.LogLevel + name: LogLevel + isExternal: true + - name: ) +- uid: LaunchDarkly.Logging.LdMicrosoftLogging.Adapter* + commentId: Overload:LaunchDarkly.Logging.LdMicrosoftLogging.Adapter + href: LaunchDarkly.Logging.LdMicrosoftLogging.html#LaunchDarkly_Logging_LdMicrosoftLogging_Adapter_Microsoft_Extensions_Logging_ILoggerFactory_ + name: Adapter + nameWithType: LdMicrosoftLogging.Adapter + fullName: LaunchDarkly.Logging.LdMicrosoftLogging.Adapter +- uid: Microsoft.Extensions.Logging.ILoggerFactory + commentId: T:Microsoft.Extensions.Logging.ILoggerFactory + parent: Microsoft.Extensions.Logging + isExternal: true + href: https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.iloggerfactory + name: ILoggerFactory + nameWithType: ILoggerFactory + fullName: Microsoft.Extensions.Logging.ILoggerFactory +- uid: LaunchDarkly.Logging.ILogAdapter + commentId: T:LaunchDarkly.Logging.ILogAdapter + parent: LaunchDarkly.Logging + isExternal: true + name: ILogAdapter + nameWithType: ILogAdapter + fullName: LaunchDarkly.Logging.ILogAdapter +- uid: Microsoft.Extensions.Logging + commentId: N:Microsoft.Extensions.Logging + isExternal: true + href: https://learn.microsoft.com/dotnet/api/microsoft + name: Microsoft.Extensions.Logging + nameWithType: Microsoft.Extensions.Logging + fullName: Microsoft.Extensions.Logging + spec.csharp: + - uid: Microsoft + name: Microsoft + isExternal: true + href: https://learn.microsoft.com/dotnet/api/microsoft + - name: . + - uid: Microsoft.Extensions + name: Extensions + isExternal: true + href: https://learn.microsoft.com/dotnet/api/microsoft.extensions + - name: . + - uid: Microsoft.Extensions.Logging + name: Logging + isExternal: true + href: https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging + spec.vb: + - uid: Microsoft + name: Microsoft + isExternal: true + href: https://learn.microsoft.com/dotnet/api/microsoft + - name: . + - uid: Microsoft.Extensions + name: Extensions + isExternal: true + href: https://learn.microsoft.com/dotnet/api/microsoft.extensions + - name: . + - uid: Microsoft.Extensions.Logging + name: Logging + isExternal: true + href: https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging diff --git a/api/LaunchDarkly.Logging.yml b/api/LaunchDarkly.Logging.yml new file mode 100644 index 0000000..9155e78 --- /dev/null +++ b/api/LaunchDarkly.Logging.yml @@ -0,0 +1,23 @@ +### YamlMime:ManagedReference +items: +- uid: LaunchDarkly.Logging + commentId: N:LaunchDarkly.Logging + id: LaunchDarkly.Logging + children: + - LaunchDarkly.Logging.LdMicrosoftLogging + langs: + - csharp + - vb + name: LaunchDarkly.Logging + nameWithType: LaunchDarkly.Logging + fullName: LaunchDarkly.Logging + type: Namespace + assemblies: + - LaunchDarkly.Logging.Microsoft +references: +- uid: LaunchDarkly.Logging.LdMicrosoftLogging + commentId: T:LaunchDarkly.Logging.LdMicrosoftLogging + href: LaunchDarkly.Logging.LdMicrosoftLogging.html + name: LdMicrosoftLogging + nameWithType: LdMicrosoftLogging + fullName: LaunchDarkly.Logging.LdMicrosoftLogging diff --git a/api/toc.yml b/api/toc.yml new file mode 100644 index 0000000..430e21a --- /dev/null +++ b/api/toc.yml @@ -0,0 +1,8 @@ +### YamlMime:TableOfContent +items: +- uid: LaunchDarkly.Logging + name: LaunchDarkly.Logging + items: + - uid: LaunchDarkly.Logging.LdMicrosoftLogging + name: LdMicrosoftLogging +memberLayout: SamePage diff --git a/docfx.json b/docfx.json new file mode 100644 index 0000000..8299f7c --- /dev/null +++ b/docfx.json @@ -0,0 +1,48 @@ +{ + "metadata": [ + { + "src": [ + { + "src": "./src", + "files": [ + "**/*.csproj", + "**/bin/**/**LaunchDarkly**.dll" + ] + } + ], + "dest": "./api", + "properties" : { + "Configuration": "Debug" + } + } + ], + "build": { + "content": [ + { + "files": [ + "**/*.{md,yml}" + ], + "exclude": [ + "docs/**" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "output": "docs", + "template": [ + "default" + ], + "globalMetadata": { + "_appName": "LaunchDarkly Logging API for .NET - Microsoft.Extensions.Logging Adapter", + "_appTitle": "LaunchDarkly Logging API for .NET - Microsoft.Extensions.Logging Adapter", + "_enableSearch": true, + "pdf": false + } + } +} diff --git a/docs-src/index.md b/index.md similarity index 100% rename from docs-src/index.md rename to index.md diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..5808655 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,8 @@ +{ + "packages": { + ".": { + "release-type": "simple", + "bootstrap-sha": "676c5a4b3763706c669c43117db19af8c5aeb80c" + } + } +} From add5c80a4cd00dbe1041a002b5f114d1b8c8c065 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:13:54 -0800 Subject: [PATCH 2/7] Fix action path. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec95112..56f4f45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: TESTFRAMEWORK: ${{ matrix.dotnet.test-framework }} steps: - uses: actions/checkout@v4 - - uses: ./github/actions/ci + - uses: ./.github/actions/ci with: sdk: ${{ matrix.dotnet.sdk }} target_test_framework: ${{ matrix.dotnet.test-framework }} From 9fe3935357695f63c6f419949deb4cb5dea807f5 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:18:07 -0800 Subject: [PATCH 3/7] Cleanup publishing. --- .github/actions/publish-docs/action.yml | 9 +++++++++ .github/workflows/publish.yml | 1 + .github/workflows/release-please.yml | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/actions/publish-docs/action.yml b/.github/actions/publish-docs/action.yml index 1a8e726..17a6a40 100644 --- a/.github/actions/publish-docs/action.yml +++ b/.github/actions/publish-docs/action.yml @@ -1,6 +1,9 @@ name: Publish Documentation description: 'Publish the documentation to Github pages' inputs: + dry_run: + description: 'Is this a dry run. If so no package will be published.' + required: true token: description: 'Token to use for publishing.' required: true @@ -9,7 +12,13 @@ runs: using: composite steps: - uses: launchdarkly/gh-actions/actions/publish-pages@publish-pages-v1.0.2 + if: ${{ inputs.dry_run == 'false' }} name: 'Publish to Github pages' with: docs_path: docs github_token: ${{ inputs.token }} + - name: Dry Run Publish + if: ${{ inputs.dry_run == 'true' }} + shell: bash + run: | + echo "This is a dry run and docs are not being published." diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 09d536c..1314d9e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -57,3 +57,4 @@ jobs: uses: ./.github/actions/publish-docs with: token: ${{ secrets.GITHUB_TOKEN }} + dry_run: ${{ inputs.dry_run }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 62ac5ff..d5c5580 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -28,6 +28,6 @@ jobs: publish: needs: ['release-please'] if: ${{ needs.release-please.outputs.releases_created == 'true' }} - uses: ./.github/workflows/publish + uses: ./.github/workflows/publish.yml with: dry_run: false From 881291df021cce24985407303ee1b8e4da4461f2 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:22:35 -0800 Subject: [PATCH 4/7] Remove API folder and update gitignore. --- .gitignore | 2 + api/.manifest | 5 - ...aunchDarkly.Logging.LdMicrosoftLogging.yml | 461 ------------------ api/LaunchDarkly.Logging.yml | 23 - api/toc.yml | 8 - 5 files changed, 2 insertions(+), 497 deletions(-) delete mode 100644 api/.manifest delete mode 100644 api/LaunchDarkly.Logging.LdMicrosoftLogging.yml delete mode 100644 api/LaunchDarkly.Logging.yml delete mode 100644 api/toc.yml diff --git a/.gitignore b/.gitignore index d631b75..45ca060 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,5 @@ project.lock.json *.snk *.p12 +docs/ +api/ diff --git a/api/.manifest b/api/.manifest deleted file mode 100644 index 7d49459..0000000 --- a/api/.manifest +++ /dev/null @@ -1,5 +0,0 @@ -{ - "LaunchDarkly.Logging": "LaunchDarkly.Logging.yml", - "LaunchDarkly.Logging.LdMicrosoftLogging": "LaunchDarkly.Logging.LdMicrosoftLogging.yml", - "LaunchDarkly.Logging.LdMicrosoftLogging.Adapter(Microsoft.Extensions.Logging.ILoggerFactory)": "LaunchDarkly.Logging.LdMicrosoftLogging.yml" -} \ No newline at end of file diff --git a/api/LaunchDarkly.Logging.LdMicrosoftLogging.yml b/api/LaunchDarkly.Logging.LdMicrosoftLogging.yml deleted file mode 100644 index d37e891..0000000 --- a/api/LaunchDarkly.Logging.LdMicrosoftLogging.yml +++ /dev/null @@ -1,461 +0,0 @@ -### YamlMime:ManagedReference -items: -- uid: LaunchDarkly.Logging.LdMicrosoftLogging - commentId: T:LaunchDarkly.Logging.LdMicrosoftLogging - id: LdMicrosoftLogging - parent: LaunchDarkly.Logging - children: - - LaunchDarkly.Logging.LdMicrosoftLogging.Adapter(Microsoft.Extensions.Logging.ILoggerFactory) - langs: - - csharp - - vb - name: LdMicrosoftLogging - nameWithType: LdMicrosoftLogging - fullName: LaunchDarkly.Logging.LdMicrosoftLogging - type: Class - source: - remote: - path: src/LaunchDarkly.Logging.Microsoft/LdMicrosoftLogging.cs - branch: rlamb/migrate-to-release-please - repo: git@github.com:launchdarkly/dotnet-logging-adapter-ms.git - id: LdMicrosoftLogging - path: src/LaunchDarkly.Logging.Microsoft/LdMicrosoftLogging.cs - startLine: 8 - assemblies: - - LaunchDarkly.Logging.Microsoft - namespace: LaunchDarkly.Logging - summary: >- - Provides integration between the LaunchDarkly SDK's logging framework and - - the Microsoft.Extensions.Logging API. - example: [] - syntax: - content: public static class LdMicrosoftLogging - content.vb: Public Module LdMicrosoftLogging - inheritance: - - System.Object - inheritedMembers: - - System.Object.Equals(System.Object) - - System.Object.Equals(System.Object,System.Object) - - System.Object.GetHashCode - - System.Object.GetType - - System.Object.MemberwiseClone - - System.Object.ReferenceEquals(System.Object,System.Object) - - System.Object.ToString -- uid: LaunchDarkly.Logging.LdMicrosoftLogging.Adapter(Microsoft.Extensions.Logging.ILoggerFactory) - commentId: M:LaunchDarkly.Logging.LdMicrosoftLogging.Adapter(Microsoft.Extensions.Logging.ILoggerFactory) - id: Adapter(Microsoft.Extensions.Logging.ILoggerFactory) - parent: LaunchDarkly.Logging.LdMicrosoftLogging - langs: - - csharp - - vb - name: Adapter(ILoggerFactory) - nameWithType: LdMicrosoftLogging.Adapter(ILoggerFactory) - fullName: LaunchDarkly.Logging.LdMicrosoftLogging.Adapter(Microsoft.Extensions.Logging.ILoggerFactory) - type: Method - source: - remote: - path: src/LaunchDarkly.Logging.Microsoft/LdMicrosoftLogging.cs - branch: rlamb/migrate-to-release-please - repo: git@github.com:launchdarkly/dotnet-logging-adapter-ms.git - id: Adapter - path: src/LaunchDarkly.Logging.Microsoft/LdMicrosoftLogging.cs - startLine: 32 - assemblies: - - LaunchDarkly.Logging.Microsoft - namespace: LaunchDarkly.Logging - summary: A logging implementation that delegates to the Microsoft.Extensions.Logging framework. - remarks: >- -

- - This method is only available when your target framework is .NET Core. It causes - - the LaunchDarkly.Logging APIs to delegate to the Microsoft.Extensions.Logging - - framework. The ILoggerFactory is the main configuration object for - - Microsoft.Extensions.Logging; application code can construct it programmatically, - - or can obtain it by dependency injection. For more information, see - - Logging - - in .NET Core and ASP.NET Core. - -

- -

- - The Microsoft.Extensions.Logging framework has its own mechanisms for filtering log - - output by level or other criteria. If you add a level filter with - - , it will filter - - out messages below that level before they reach the Microsoft logger. - -

- example: [] - syntax: - content: public static ILogAdapter Adapter(ILoggerFactory loggerFactory) - parameters: - - id: loggerFactory - type: Microsoft.Extensions.Logging.ILoggerFactory - description: the factory object for Microsoft logging - return: - type: LaunchDarkly.Logging.ILogAdapter - description: a logging adapter - content.vb: Public Shared Function Adapter(loggerFactory As ILoggerFactory) As ILogAdapter - overload: LaunchDarkly.Logging.LdMicrosoftLogging.Adapter* -references: -- uid: LaunchDarkly.Logging - commentId: N:LaunchDarkly.Logging - href: LaunchDarkly.html - name: LaunchDarkly.Logging - nameWithType: LaunchDarkly.Logging - fullName: LaunchDarkly.Logging - spec.csharp: - - uid: LaunchDarkly - name: LaunchDarkly - href: LaunchDarkly.html - - name: . - - uid: LaunchDarkly.Logging - name: Logging - href: LaunchDarkly.Logging.html - spec.vb: - - uid: LaunchDarkly - name: LaunchDarkly - href: LaunchDarkly.html - - name: . - - uid: LaunchDarkly.Logging - name: Logging - href: LaunchDarkly.Logging.html -- uid: System.Object - commentId: T:System.Object - parent: System - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object - name: object - nameWithType: object - fullName: object - nameWithType.vb: Object - fullName.vb: Object - name.vb: Object -- uid: System.Object.Equals(System.Object) - commentId: M:System.Object.Equals(System.Object) - parent: System.Object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object) - name: Equals(object) - nameWithType: object.Equals(object) - fullName: object.Equals(object) - nameWithType.vb: Object.Equals(Object) - fullName.vb: Object.Equals(Object) - name.vb: Equals(Object) - spec.csharp: - - uid: System.Object.Equals(System.Object) - name: Equals - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object) - - name: ( - - uid: System.Object - name: object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object - - name: ) - spec.vb: - - uid: System.Object.Equals(System.Object) - name: Equals - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object) - - name: ( - - uid: System.Object - name: Object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object - - name: ) -- uid: System.Object.Equals(System.Object,System.Object) - commentId: M:System.Object.Equals(System.Object,System.Object) - parent: System.Object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object) - name: Equals(object, object) - nameWithType: object.Equals(object, object) - fullName: object.Equals(object, object) - nameWithType.vb: Object.Equals(Object, Object) - fullName.vb: Object.Equals(Object, Object) - name.vb: Equals(Object, Object) - spec.csharp: - - uid: System.Object.Equals(System.Object,System.Object) - name: Equals - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object) - - name: ( - - uid: System.Object - name: object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object - - name: ',' - - name: " " - - uid: System.Object - name: object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object - - name: ) - spec.vb: - - uid: System.Object.Equals(System.Object,System.Object) - name: Equals - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object) - - name: ( - - uid: System.Object - name: Object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object - - name: ',' - - name: " " - - uid: System.Object - name: Object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object - - name: ) -- uid: System.Object.GetHashCode - commentId: M:System.Object.GetHashCode - parent: System.Object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.gethashcode - name: GetHashCode() - nameWithType: object.GetHashCode() - fullName: object.GetHashCode() - nameWithType.vb: Object.GetHashCode() - fullName.vb: Object.GetHashCode() - spec.csharp: - - uid: System.Object.GetHashCode - name: GetHashCode - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.gethashcode - - name: ( - - name: ) - spec.vb: - - uid: System.Object.GetHashCode - name: GetHashCode - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.gethashcode - - name: ( - - name: ) -- uid: System.Object.GetType - commentId: M:System.Object.GetType - parent: System.Object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.gettype - name: GetType() - nameWithType: object.GetType() - fullName: object.GetType() - nameWithType.vb: Object.GetType() - fullName.vb: Object.GetType() - spec.csharp: - - uid: System.Object.GetType - name: GetType - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.gettype - - name: ( - - name: ) - spec.vb: - - uid: System.Object.GetType - name: GetType - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.gettype - - name: ( - - name: ) -- uid: System.Object.MemberwiseClone - commentId: M:System.Object.MemberwiseClone - parent: System.Object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone - name: MemberwiseClone() - nameWithType: object.MemberwiseClone() - fullName: object.MemberwiseClone() - nameWithType.vb: Object.MemberwiseClone() - fullName.vb: Object.MemberwiseClone() - spec.csharp: - - uid: System.Object.MemberwiseClone - name: MemberwiseClone - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone - - name: ( - - name: ) - spec.vb: - - uid: System.Object.MemberwiseClone - name: MemberwiseClone - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone - - name: ( - - name: ) -- uid: System.Object.ReferenceEquals(System.Object,System.Object) - commentId: M:System.Object.ReferenceEquals(System.Object,System.Object) - parent: System.Object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.referenceequals - name: ReferenceEquals(object, object) - nameWithType: object.ReferenceEquals(object, object) - fullName: object.ReferenceEquals(object, object) - nameWithType.vb: Object.ReferenceEquals(Object, Object) - fullName.vb: Object.ReferenceEquals(Object, Object) - name.vb: ReferenceEquals(Object, Object) - spec.csharp: - - uid: System.Object.ReferenceEquals(System.Object,System.Object) - name: ReferenceEquals - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.referenceequals - - name: ( - - uid: System.Object - name: object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object - - name: ',' - - name: " " - - uid: System.Object - name: object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object - - name: ) - spec.vb: - - uid: System.Object.ReferenceEquals(System.Object,System.Object) - name: ReferenceEquals - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.referenceequals - - name: ( - - uid: System.Object - name: Object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object - - name: ',' - - name: " " - - uid: System.Object - name: Object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object - - name: ) -- uid: System.Object.ToString - commentId: M:System.Object.ToString - parent: System.Object - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.tostring - name: ToString() - nameWithType: object.ToString() - fullName: object.ToString() - nameWithType.vb: Object.ToString() - fullName.vb: Object.ToString() - spec.csharp: - - uid: System.Object.ToString - name: ToString - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.tostring - - name: ( - - name: ) - spec.vb: - - uid: System.Object.ToString - name: ToString - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system.object.tostring - - name: ( - - name: ) -- uid: System - commentId: N:System - isExternal: true - href: https://learn.microsoft.com/dotnet/api/system - name: System - nameWithType: System - fullName: System -- uid: LaunchDarkly.Logging.ILogAdapterExtensions.Level(LaunchDarkly.Logging.ILogAdapter,LaunchDarkly.Logging.LogLevel) - commentId: M:LaunchDarkly.Logging.ILogAdapterExtensions.Level(LaunchDarkly.Logging.ILogAdapter,LaunchDarkly.Logging.LogLevel) - isExternal: true - name: Level(ILogAdapter, LogLevel) - nameWithType: ILogAdapterExtensions.Level(ILogAdapter, LogLevel) - fullName: LaunchDarkly.Logging.ILogAdapterExtensions.Level(LaunchDarkly.Logging.ILogAdapter, LaunchDarkly.Logging.LogLevel) - spec.csharp: - - uid: LaunchDarkly.Logging.ILogAdapterExtensions.Level(LaunchDarkly.Logging.ILogAdapter,LaunchDarkly.Logging.LogLevel) - name: Level - isExternal: true - - name: ( - - uid: LaunchDarkly.Logging.ILogAdapter - name: ILogAdapter - isExternal: true - - name: ',' - - name: " " - - uid: LaunchDarkly.Logging.LogLevel - name: LogLevel - isExternal: true - - name: ) - spec.vb: - - uid: LaunchDarkly.Logging.ILogAdapterExtensions.Level(LaunchDarkly.Logging.ILogAdapter,LaunchDarkly.Logging.LogLevel) - name: Level - isExternal: true - - name: ( - - uid: LaunchDarkly.Logging.ILogAdapter - name: ILogAdapter - isExternal: true - - name: ',' - - name: " " - - uid: LaunchDarkly.Logging.LogLevel - name: LogLevel - isExternal: true - - name: ) -- uid: LaunchDarkly.Logging.LdMicrosoftLogging.Adapter* - commentId: Overload:LaunchDarkly.Logging.LdMicrosoftLogging.Adapter - href: LaunchDarkly.Logging.LdMicrosoftLogging.html#LaunchDarkly_Logging_LdMicrosoftLogging_Adapter_Microsoft_Extensions_Logging_ILoggerFactory_ - name: Adapter - nameWithType: LdMicrosoftLogging.Adapter - fullName: LaunchDarkly.Logging.LdMicrosoftLogging.Adapter -- uid: Microsoft.Extensions.Logging.ILoggerFactory - commentId: T:Microsoft.Extensions.Logging.ILoggerFactory - parent: Microsoft.Extensions.Logging - isExternal: true - href: https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.iloggerfactory - name: ILoggerFactory - nameWithType: ILoggerFactory - fullName: Microsoft.Extensions.Logging.ILoggerFactory -- uid: LaunchDarkly.Logging.ILogAdapter - commentId: T:LaunchDarkly.Logging.ILogAdapter - parent: LaunchDarkly.Logging - isExternal: true - name: ILogAdapter - nameWithType: ILogAdapter - fullName: LaunchDarkly.Logging.ILogAdapter -- uid: Microsoft.Extensions.Logging - commentId: N:Microsoft.Extensions.Logging - isExternal: true - href: https://learn.microsoft.com/dotnet/api/microsoft - name: Microsoft.Extensions.Logging - nameWithType: Microsoft.Extensions.Logging - fullName: Microsoft.Extensions.Logging - spec.csharp: - - uid: Microsoft - name: Microsoft - isExternal: true - href: https://learn.microsoft.com/dotnet/api/microsoft - - name: . - - uid: Microsoft.Extensions - name: Extensions - isExternal: true - href: https://learn.microsoft.com/dotnet/api/microsoft.extensions - - name: . - - uid: Microsoft.Extensions.Logging - name: Logging - isExternal: true - href: https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging - spec.vb: - - uid: Microsoft - name: Microsoft - isExternal: true - href: https://learn.microsoft.com/dotnet/api/microsoft - - name: . - - uid: Microsoft.Extensions - name: Extensions - isExternal: true - href: https://learn.microsoft.com/dotnet/api/microsoft.extensions - - name: . - - uid: Microsoft.Extensions.Logging - name: Logging - isExternal: true - href: https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging diff --git a/api/LaunchDarkly.Logging.yml b/api/LaunchDarkly.Logging.yml deleted file mode 100644 index 9155e78..0000000 --- a/api/LaunchDarkly.Logging.yml +++ /dev/null @@ -1,23 +0,0 @@ -### YamlMime:ManagedReference -items: -- uid: LaunchDarkly.Logging - commentId: N:LaunchDarkly.Logging - id: LaunchDarkly.Logging - children: - - LaunchDarkly.Logging.LdMicrosoftLogging - langs: - - csharp - - vb - name: LaunchDarkly.Logging - nameWithType: LaunchDarkly.Logging - fullName: LaunchDarkly.Logging - type: Namespace - assemblies: - - LaunchDarkly.Logging.Microsoft -references: -- uid: LaunchDarkly.Logging.LdMicrosoftLogging - commentId: T:LaunchDarkly.Logging.LdMicrosoftLogging - href: LaunchDarkly.Logging.LdMicrosoftLogging.html - name: LdMicrosoftLogging - nameWithType: LdMicrosoftLogging - fullName: LaunchDarkly.Logging.LdMicrosoftLogging diff --git a/api/toc.yml b/api/toc.yml deleted file mode 100644 index 430e21a..0000000 --- a/api/toc.yml +++ /dev/null @@ -1,8 +0,0 @@ -### YamlMime:TableOfContent -items: -- uid: LaunchDarkly.Logging - name: LaunchDarkly.Logging - items: - - uid: LaunchDarkly.Logging.LdMicrosoftLogging - name: LdMicrosoftLogging -memberLayout: SamePage From 57ad2631b500495a8413555781b46258769241c7 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:30:19 -0800 Subject: [PATCH 5/7] Publishing updates. --- .github/workflows/publish.yml | 42 ++++++++++++++++++++-------- .github/workflows/release-please.yml | 1 + 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1314d9e..5098e83 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,12 +7,21 @@ on: description: 'Is this a dry run. If so no package will be published.' type: boolean required: true + tag: + description: 'Tag for provenance. For a dry run the value does not matter.' + type: string + required: true + workflow_call: inputs: dry_run: description: 'Is this a dry run. If so no package will be published.' type: boolean required: true + tag: + description: 'Tag for provenance' + type: string + required: true jobs: publish: @@ -23,18 +32,17 @@ jobs: pull-requests: write steps: - # - uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0 - # if: ${{ needs.release-please.outputs.releases_created == 'true' }} - # name: Get secrets - # with: - # aws_assume_role: ${{ inputs.aws_role }} - # ssm_parameter_pairs: '/production/common/releasing/digicert/host = DIGICERT_HOST, - # /production/common/releasing/digicert/api_key = DIGICERT_API_KEY, - # /production/common/releasing/digicert/client_cert_file_b64 = DIGICERT_CLIENT_CERT_FILE_B64, - # /production/common/releasing/digicert/client_cert_password = DIGICERT_CLIENT_CERT_PASSWORD, - # /production/common/releasing/digicert/code_signing_cert_sha1_hash = DIGICERT_CODE_SIGNING_CERT_SHA1_HASH, - # /production/common/releasing/nuget/api_key = NUGET_API_KEY' - # s3_path_pairs: 'launchdarkly-releaser/dotnet/LaunchDarkly.snk = LaunchDarkly.snk' + - uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0 + name: Get secrets + with: + aws_assume_role: ${{ vars.AWS_ROLE_ARN }} + ssm_parameter_pairs: '/production/common/releasing/digicert/host = DIGICERT_HOST, + /production/common/releasing/digicert/api_key = DIGICERT_API_KEY, + /production/common/releasing/digicert/client_cert_file_b64 = DIGICERT_CLIENT_CERT_FILE_B64, + /production/common/releasing/digicert/client_cert_password = DIGICERT_CLIENT_CERT_PASSWORD, + /production/common/releasing/digicert/code_signing_cert_sha1_hash = DIGICERT_CODE_SIGNING_CERT_SHA1_HASH, + /production/common/releasing/nuget/api_key = NUGET_API_KEY' + s3_path_pairs: 'launchdarkly-releaser/dotnet/LaunchDarkly.snk = LaunchDarkly.snk' - name: Build Release uses: ./.github/actions/build-release @@ -49,6 +57,7 @@ jobs: dll_name: LaunchDarkly.Logging.Microsoft.dll - name: Publish Nupkg + id: publish uses: ./.github/actions/publish with: dry_run: ${{ inputs.dry_run }} @@ -58,3 +67,12 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} dry_run: ${{ inputs.dry_run }} + + - name: Provenance + uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.10.0 + if: ${{ inputs.dry_run == 'false' }} + with: + base64-subjects: "${{ steps.publish.outputs.hashes }}" + upload-assets: true + upload-tag-name: ${{ inputs.tag }} + provenance-name: ${{ format('LaunchDarkly.Logging.Microsoft-{0}_provenance.intoto.jsonl', inputs.tag) }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index d5c5580..4e930b6 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -31,3 +31,4 @@ jobs: uses: ./.github/workflows/publish.yml with: dry_run: false + tag: ${{ needs.release-please.outputs.tag_name }} From 622fe1b607feb841c221503527004760544e189f Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:38:07 -0800 Subject: [PATCH 6/7] Provenance job. --- .github/workflows/publish.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5098e83..b189152 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -68,11 +68,14 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} dry_run: ${{ inputs.dry_run }} - - name: Provenance - uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.10.0 - if: ${{ inputs.dry_run == 'false' }} + provenance: + if: ${{ inputs.dry_run == 'false' }} + runs-on: ubuntu-latest + needs: ['publish'] + steps: + - uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.10.0 with: - base64-subjects: "${{ steps.publish.outputs.hashes }}" + base64-subjects: "${{ needs.publish.outputs.hashes }}" upload-assets: true upload-tag-name: ${{ inputs.tag }} provenance-name: ${{ format('LaunchDarkly.Logging.Microsoft-{0}_provenance.intoto.jsonl', inputs.tag) }} From ac34e692c08aa713a1636875944b932bec3f6158 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:42:29 -0800 Subject: [PATCH 7/7] Re-usable workflow syntax. --- .github/workflows/publish.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b189152..ea2948c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -70,12 +70,10 @@ jobs: provenance: if: ${{ inputs.dry_run == 'false' }} - runs-on: ubuntu-latest needs: ['publish'] - steps: - - uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.10.0 - with: - base64-subjects: "${{ needs.publish.outputs.hashes }}" - upload-assets: true - upload-tag-name: ${{ inputs.tag }} - provenance-name: ${{ format('LaunchDarkly.Logging.Microsoft-{0}_provenance.intoto.jsonl', inputs.tag) }} + uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.10.0 + with: + base64-subjects: "${{ needs.publish.outputs.hashes }}" + upload-assets: true + upload-tag-name: ${{ inputs.tag }} + provenance-name: ${{ format('LaunchDarkly.Logging.Microsoft-{0}_provenance.intoto.jsonl', inputs.tag) }}