From 08c19561f8fb482d1ec3331e23d5ba44519f3543 Mon Sep 17 00:00:00 2001 From: christian <6939810+chkr1011@users.noreply.github.com> Date: Fri, 17 May 2024 17:54:12 +0200 Subject: [PATCH 1/2] Setup signing --- .github/workflows/ci.yml | 50 +++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a1faedac..f01900937 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: [push, pull_request] env: - VERSION: "4.3.4.${{github.run_number}}" + VERSION: "4.3.5.${{github.run_number}}" jobs: build: @@ -17,7 +17,7 @@ jobs: sdk-version: 18362 - name: Setup .NET SDK - uses: actions/setup-dotnet@v1.9.0 + uses: actions/setup-dotnet@v4 with: dotnet-version: | 3.1.x @@ -28,27 +28,13 @@ jobs: uses: microsoft/setup-msbuild@v1.1 - name: Checkout Code - uses: actions/checkout@v2 - - - name: Setup Signing Certificate - run: | - $secret = '${{ secrets.SNC_BASE64 }}' - $decoded = [System.Convert]::FromBase64CharArray($secret, 0, $secret.Length) - Set-Content -Path ${{ github.workspace }}\certificate.snk -Value $decoded -AsByteStream + uses: actions/checkout@v4 - name: Restore nuget packages run: msbuild MQTTnet.sln /t:Restore /p:Configuration="Release" /verbosity:m - name: Build solution - run: msbuild MQTTnet.sln /t:Build /p:Configuration="Release" /verbosity:m /p:FileVersion=${{ env.VERSION }} /p:AssemblyVersion=${{ env.VERSION }} /p:PackageVersion=${{ env.VERSION }} /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=${{ github.workspace }}\certificate.snk - - - name: Collect nuget Packages - uses: actions/upload-artifact@v2 - with: - name: nuget Packages - path: | - **\*.nupkg - **\*.snupkg + run: msbuild MQTTnet.sln /t:Build /p:Configuration="Release" /verbosity:m /p:FileVersion=${{ env.VERSION }} /p:AssemblyVersion=${{ env.VERSION }} /p:PackageVersion=${{ env.VERSION }} - name: Setup VSTest uses: darenm/Setup-VSTest@v1 @@ -59,6 +45,32 @@ jobs: - name: ASP.NET Tests run: vstest.console.exe Source\MQTTnet.AspNetCore.Tests\bin\Release\netcoreapp3.1\MQTTnet.AspNetCore.Tests.dll + - name: Install sign CLI tool + run: dotnet tool install --tool-path . sign --version 0.9.0-beta.23127.3 + + - name: Sign nugets + shell: pwsh + run: > + ./sign code azure-key-vault ` + "**/*.nupkg" ` + --base-directory "${{ github.workspace }}/Source" ` + --publisher-name "MQTTnet" ` + --description "MQTTnet" ` + --description-url "https://github.com/dotnet/MQTTnet" ` + --azure-key-vault-tenant-id "${{ secrets.AZURE_TENANT_ID }}" ` + --azure-key-vault-client-id "${{ secrets.AZURE_CLIENT_ID }}" ` + --azure-key-vault-client-secret "${{ secrets.AZURE_CLIENT_SECRET }}" ` + --azure-key-vault-certificate "${{ secrets.KEY_VAULT_CERTIFICATE_ID }}" ` + --azure-key-vault-url "${{ secrets.KEY_VAULT_URL }}" + + - name: Upload signed nuget packages + uses: actions/upload-artifact@v4 + with: + name: signed-nugets + path: | + ${{ github.workspace }}/Source/**/*.nupkg + ${{ github.workspace }}/Source/**/*.snupkg + - name: Publish MyGet nugets if: ${{ github.event_name == 'push' }} - run: dotnet nuget push **/*.nupkg -k ${{ secrets.MYGET_API_KEY }} -s https://www.myget.org/F/mqttnet/api/v3/index.json --skip-duplicate \ No newline at end of file + run: dotnet nuget push ${{ github.workspace }}/Source/**/*.nupkg -k ${{ secrets.MYGET_API_KEY }} -s https://www.myget.org/F/mqttnet/api/v3/index.json --skip-duplicate From d0a06bd920800516a70941305d91c0ce066994c2 Mon Sep 17 00:00:00 2001 From: christian <6939810+chkr1011@users.noreply.github.com> Date: Fri, 17 May 2024 18:01:46 +0200 Subject: [PATCH 2/2] Update release notes --- .github/workflows/ReleaseNotes.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/ReleaseNotes.md b/.github/workflows/ReleaseNotes.md index 1016e556a..a0500c3e7 100644 --- a/.github/workflows/ReleaseNotes.md +++ b/.github/workflows/ReleaseNotes.md @@ -1,13 +1 @@ -* [Core] Optimized packet serialization of PUBACK and PUBREC packets for protocol version 5.0.0 (#1939, thanks to @Y-Sindo). -* [Core] The package inspector is now fully async (#1941). -* [Core] Fixed decoding of DISCONNECT packet with empty body (#1994, thanks to @Y-Sindo). -* [Client] Exposed the _EndPoint_ type to support other endpoint types (like Unix Domain Sockets) in client options (#1919). -* [Client] Fixed support for unix sockets by exposing more options (#1995). -* [Client] Added a dedicated exception when the client is not connected (#1954, thanks to @marcpiulachs). -* [Client] The client will now throw a _MqttClientUnexpectedDisconnectReceivedException_ when publishing a QoS 0 message which leads to a server disconnect (BREAKING CHANGE!, #1974, thanks to @fazho). -* [Client] Exposed the certificate selection event handler in client options (#1984). -* [Server] The server will no longer send _NoMatchingSubscribers_ when the actual subscription was non success (#1965, BREAKING CHANGE!). -* [Server] Fixed broken support for _null_ in _AddServer_ method in ASP.NET integration (#1981). -* [ManagedClient] Added a new event (SubscriptionsChangedAsync) which is fired when a subscription or unsubscription was made (#1894, thanks to @pdufrene). -* [ManagedClient] Fixed race condition when server shuts down while subscribing (#1987, thanks to @marve). -* [TopicTemplate] Added new extension which provides a template engine for topics (#1932, thanks to @simonthum). +* All nuget packages are now signed. \ No newline at end of file