Skip to content

Commit

Permalink
Enable nuget signing
Browse files Browse the repository at this point in the history
  • Loading branch information
chkr1011 committed May 16, 2024
1 parent 40d1d4e commit 9d56b62
Showing 1 changed file with 3 additions and 35 deletions.
38 changes: 3 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

# - name: Download code signing certificate
# uses: timheuer/[email protected]
# 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: |
Expand All @@ -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
Expand All @@ -78,35 +62,19 @@ jobs:
6.0.x
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: nugets
path: nugets

- 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" `
Expand Down

0 comments on commit 9d56b62

Please sign in to comment.