diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 859a9078..b4a6a917 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,10 +3,10 @@ name: Run Release Release on: push: branches: - - main + - v1 jobs: - release-package: + release-please: runs-on: ubuntu-latest steps: @@ -15,15 +15,22 @@ jobs: with: command: manifest token: ${{secrets.GITHUB_TOKEN}} - default-branch: main + default-branch: v1 + outputs: + release_created: ${{ steps.release.outputs.release_created }} + release_tag_name: ${{ steps.release.outputs.tag_name }} + release: + runs-on: ubuntu-latest + needs: release-please + if: ${{ needs.release-please.outputs.release_created }} + + steps: - uses: actions/checkout@v4 - if: ${{ steps.release.outputs.releases_created }} with: fetch-depth: 0 - name: Setup .NET SDK - if: ${{ steps.release.outputs.releases_created }} uses: actions/setup-dotnet@v4 env: NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -34,13 +41,33 @@ jobs: source-url: https://nuget.pkg.github.com/open-feature/index.json - name: Install dependencies - if: ${{ steps.release.outputs.releases_created }} run: dotnet restore - name: Pack - if: ${{ steps.release.outputs.releases_created }} run: dotnet pack --no-restore - name: Publish to Nuget - if: ${{ steps.release.outputs.releases_created }} run: dotnet nuget push "src/**/*.nupkg" --api-key "${{ secrets.NUGET_TOKEN }}" --source https://api.nuget.org/v3/index.json + + sbom: + runs-on: ubuntu-latest + needs: release-please + continue-on-error: true + if: ${{ needs.release-please.outputs.release_created }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install CycloneDX.NET + run: dotnet tool install CycloneDX + + - name: Generate .NET BOM + run: dotnet CycloneDX --json --exclude-dev -sv "${{ needs.release-please.outputs.release_tag_name }}" ./src/OpenFeature/OpenFeature.csproj + + - name: Attach SBOM to artifact + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: + gh release upload ${{ needs.release-please.outputs.release_tag_name }} bom.json diff --git a/.release-please-manifest.json b/.release-please-manifest.json index dd8fde77..e20d7e81 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.5.0" + ".": "1.5.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 929d2c66..1dce653e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [1.5.1](https://github.com/open-feature/dotnet-sdk/compare/v1.5.0...v1.5.1) (2024-04-09) + + +### ๐Ÿ› Bug Fixes + +* Add missing error message when an error occured ([#258](https://github.com/open-feature/dotnet-sdk/issues/258)) ([bd4c6cc](https://github.com/open-feature/dotnet-sdk/commit/bd4c6cc8024dc34a8fcb299216cd4199c54c5956)) + + +### ๐Ÿงน Chore + +* **deps:** Project file cleanup and remove unnecessary dependencies ([#251](https://github.com/open-feature/dotnet-sdk/issues/251)) ([79def47](https://github.com/open-feature/dotnet-sdk/commit/79def47106b19b316b691fa195f7160ddcfb9a41)) +* **deps:** update dependency coverlet.collector to v6.0.2 ([#247](https://github.com/open-feature/dotnet-sdk/issues/247)) ([ab34c16](https://github.com/open-feature/dotnet-sdk/commit/ab34c16b513ddbd0a53e925baaccd088163fbcc8)) +* support v1 publishing ([b4a2409](https://github.com/open-feature/dotnet-sdk/commit/b4a24094a282e0f7cb26c0c70ff7cf09e8e08991)) + ## [1.5.0](https://github.com/open-feature/dotnet-sdk/compare/v1.4.1...v1.5.0) (2024-03-12) diff --git a/Directory.Packages.props b/Directory.Packages.props index 324bf73e..b683b9e7 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -14,7 +14,7 @@ - + diff --git a/README.md b/README.md index 6cb3c35c..a7a49f56 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ [![Specification](https://img.shields.io/static/v1?label=specification&message=v0.7.0&color=yellow&style=for-the-badge)](https://github.com/open-feature/spec/releases/tag/v0.7.0) [ - ![Release](https://img.shields.io/static/v1?label=release&message=v1.5.0&color=blue&style=for-the-badge) -](https://github.com/open-feature/dotnet-sdk/releases/tag/v1.5.0) + ![Release](https://img.shields.io/static/v1?label=release&message=v1.5.1&color=blue&style=for-the-badge) +](https://github.com/open-feature/dotnet-sdk/releases/tag/v1.5.1) [![Slack](https://img.shields.io/badge/slack-%40cncf%2Fopenfeature-brightgreen?style=flat&logo=slack)](https://cloud-native.slack.com/archives/C0344AANLA1) [![Codecov](https://codecov.io/gh/open-feature/dotnet-sdk/branch/main/graph/badge.svg?token=MONAVJBXUJ)](https://codecov.io/gh/open-feature/dotnet-sdk) diff --git a/build/Common.prod.props b/build/Common.prod.props index 2431a810..0538422c 100644 --- a/build/Common.prod.props +++ b/build/Common.prod.props @@ -9,7 +9,7 @@ - 1.5.0 + 1.5.1 git https://github.com/open-feature/dotnet-sdk OpenFeature is an open standard for feature flag management, created to support a robust feature flag ecosystem using cloud native technologies. OpenFeature will provide a unified API and SDK, and a developer-first, cloud-native implementation, with extensibility for open source and commercial offerings. diff --git a/build/Common.props b/build/Common.props index 8468f7d2..b1857e0d 100644 --- a/build/Common.props +++ b/build/Common.props @@ -18,8 +18,8 @@ - - + + diff --git a/src/OpenFeature/OpenFeature.csproj b/src/OpenFeature/OpenFeature.csproj index da82b999..9e272ba2 100644 --- a/src/OpenFeature/OpenFeature.csproj +++ b/src/OpenFeature/OpenFeature.csproj @@ -7,21 +7,14 @@ - - + - - <_Parameter1>OpenFeature.Benchmarks - - - <_Parameter1>OpenFeature.Tests - - - <_Parameter1>OpenFeature.E2ETests - + + + diff --git a/src/OpenFeature/OpenFeatureClient.cs b/src/OpenFeature/OpenFeatureClient.cs index 56fc518f..8c4dbdd5 100644 --- a/src/OpenFeature/OpenFeatureClient.cs +++ b/src/OpenFeature/OpenFeatureClient.cs @@ -262,7 +262,7 @@ private async Task> EvaluateFlag( { this._logger.LogError(ex, "Error while evaluating flag {FlagKey}", flagKey); var errorCode = ex is InvalidCastException ? ErrorType.TypeMismatch : ErrorType.General; - evaluation = new FlagEvaluationDetails(flagKey, defaultValue, errorCode, Reason.Error, string.Empty); + evaluation = new FlagEvaluationDetails(flagKey, defaultValue, errorCode, Reason.Error, string.Empty, ex.Message); await this.TriggerErrorHooks(allHooksReversed, hookContext, ex, options).ConfigureAwait(false); } finally diff --git a/test/OpenFeature.Tests/OpenFeatureClientTests.cs b/test/OpenFeature.Tests/OpenFeatureClientTests.cs index 86c61f83..3c2384cf 100644 --- a/test/OpenFeature.Tests/OpenFeatureClientTests.cs +++ b/test/OpenFeature.Tests/OpenFeatureClientTests.cs @@ -177,6 +177,7 @@ public async Task OpenFeatureClient_Should_Return_DefaultValue_When_Type_Mismatc var evaluationDetails = await client.GetObjectDetails(flagName, defaultValue); evaluationDetails.ErrorType.Should().Be(ErrorType.TypeMismatch); + evaluationDetails.ErrorMessage.Should().Be(new InvalidCastException().Message); _ = mockedFeatureProvider.Received(1).ResolveStructureValue(flagName, defaultValue, Arg.Any()); diff --git a/version.txt b/version.txt index bc80560f..26ca5946 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.5.0 +1.5.1