From 9d56b6221d33f0d4a435950458bd7035354acf71 Mon Sep 17 00:00:00 2001 From: christian <6939810+chkr1011@users.noreply.github.com> Date: Thu, 16 May 2024 20:56:31 +0200 Subject: [PATCH] Enable nuget signing --- .github/workflows/ci.yml | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 883caab24..cf6070c4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,25 +22,11 @@ jobs: - name: Checkout code uses: actions/checkout@v4 -# - name: Download code signing certificate -# uses: timheuer/base64-to-file@v1.2 -# with: -# fileName: certificate.snk -# fileDir: ${{ github.workspace }} -# encodedString: ${{ secrets.SNC_BASE64 }} - - name: Build package run: dotnet build MQTTnet.sln --configuration Release /p:FileVersion=${{ env.VERSION }} /p:AssemblyVersion=${{ env.VERSION }} /p:PackageVersion=${{ env.VERSION }} - #run: dotnet pack MQTTnet.sln --configuration Release /p:FileVersion=${{ env.VERSION }} /p:AssemblyVersion=${{ env.VERSION }} /p:PackageVersion=${{ env.VERSION }} /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=${{ github.workspace }}/certificate.snk - - # - name: Upload signing file list - # uses: actions/upload-artifact@v3 - # with: - # name: config - # path: config - name: Upload nuget packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: nugets path: | @@ -67,8 +53,6 @@ jobs: sign: needs: build runs-on: windows-latest # Code signing must run on a Windows agent for Authenticode signing (dll/exe) -# permissions: -# id-token: write # Required for requesting the JWT steps: - name: Setup .NET SDK @@ -78,7 +62,7 @@ jobs: 6.0.x - name: Download build artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: nugets path: nugets @@ -86,27 +70,11 @@ jobs: - name: Install sign CLI tool run: dotnet tool install --tool-path . sign --version 0.9.0-beta.23127.3 - # - name: Download signing config - # uses: actions/download-artifact@v3 - # with: - # name: config - # path: config - - - -# - name: 'Azure CLI login' -# uses: azure/login@v1 -# with: -# allow-no-subscriptions: true -# client-id: ${{ secrets.AZURE_CLIENT_ID }} -# tenant-id: ${{ secrets.AZURE_TENANT_ID }} -# subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - - name: Sign nugets shell: pwsh run: > ./sign code azure-key-vault ` - "**/*.nupkg" ` + "nugets\*.nupkg" ` --base-directory "${{ github.workspace }}\nugets" ` --publisher-name "MQTTnet" ` --description "MQTTnet" `