From 6a4f5b17aede579ac180cfd007eee7c445a78d29 Mon Sep 17 00:00:00 2001 From: hiento09 <136591877+hiento09@users.noreply.github.com> Date: Mon, 4 Dec 2023 21:47:03 +0700 Subject: [PATCH] Add windows codesign for nitro (#233) Co-authored-by: Hien To --- .github/workflows/build.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17530ce7a..477df5f92 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -336,6 +336,8 @@ jobs: run: | robocopy build_deps\_install\bin .\build\Release zlib.dll robocopy build\bin\Release .\build\Release llama.dll + dotnet tool install --global AzureSignTool + azuresigntool.exe sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.globalsign.com/tsa/r6advanced1 -v ".\build\Release\nitro.exe" 7z a -ttar temp.tar .\build\Release\* 7z a -tgzip nitro.tar.gz temp.tar @@ -389,6 +391,10 @@ jobs: env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.x' + - name: Build id: cmake_build shell: cmd @@ -407,6 +413,8 @@ jobs: set PATH=%PATH%;C:\Program Files\7-Zip\ robocopy build_deps\_install\bin .\build\Release zlib.dll robocopy build\bin\Release .\build\Release llama.dll + dotnet tool install --global AzureSignTool + %USERPROFILE%\.dotnet\tools\azuresigntool.exe sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.globalsign.com/tsa/r6advanced1 -v ".\build\Release\nitro.exe" 7z a -ttar temp.tar .\build\Release\* 7z a -tgzip nitro.tar.gz temp.tar