Skip to content

Commit

Permalink
Adding support for code-signing
Browse files Browse the repository at this point in the history
Signed-off-by: Tanner Gooding <[email protected]>
  • Loading branch information
tannergooding authored Feb 12, 2023
1 parent 3143c19 commit 2992676
Showing 1 changed file with 52 additions and 5 deletions.
57 changes: 52 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ main, v* ]
pull_request:
branches: [ main, v* ]
workflow_dispatch:

jobs:
windows-x64:
Expand Down Expand Up @@ -40,7 +41,7 @@ jobs:
shell: cmd
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}_${{ matrix.configuration }}_x86
name: ${{ matrix.os }}_${{ matrix.configuration }}_${{ matrix.architecture }}
path: |
./artifacts/bin/**/*
./artifacts/log/**/*
Expand Down Expand Up @@ -105,6 +106,29 @@ jobs:
./artifacts/pkg/**/*
./artifacts/tst/**/*
if-no-files-found: error
sign-nuget-preview:
runs-on: windows-latest
if: ${{ github.event_name == 'push' }}
needs: [ build-nuget-preview ]
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: nuget_preview
path: ./artifacts
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- run: dotnet tool install --tool-path ./artifacts/tools sign --version 0.9.0-beta.23063.3
- run: ./artifacts/tools/sign code azure-key-vault "**/*.nupkg" --timestamp-url "http://timestamp.digicert.com" --base-directory "${{ github.workspace }}/artifacts/pkg" --file-list "${{ github.workspace }}/scripts/SignClientFileList.txt" --publisher-name "TerraFX" --description "TerraFX.Interop.PulseAudio" --description-url "https://github.com/terrafx/terrafx.interop.pulseaudio" --azure-key-vault-certificate "${{ secrets.SC_KEY_VAULT_CERTIFICATE_ID }}" --azure-key-vault-client-id "${{ secrets.SC_AZURE_CLIENT_ID }}" --azure-key-vault-client-secret "${{ secrets.SC_AZURE_CLIENT_SECRET }}" --azure-key-vault-tenant-id "${{ secrets.SC_AZURE_TENANT_ID }}" --azure-key-vault-url "${{ secrets.SC_KEY_VAULT_URL }}"
- uses: actions/upload-artifact@v3
with:
name: sign_nuget_preview
path: |
./artifacts/pkg/**/*
if-no-files-found: error
build-nuget-release:
runs-on: windows-latest
if: false
Expand All @@ -124,12 +148,35 @@ jobs:
./artifacts/pkg/**/*
./artifacts/tst/**/*
if-no-files-found: error
sign-nuget-release:
runs-on: windows-latest
if: ${{ github.event_name == 'push' }}
needs: [ build-nuget-release ]
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: nuget_release
path: ./artifacts
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- run: dotnet tool install --tool-path ./artifacts/tools sign --version 0.9.0-beta.23063.3
- run: ./artifacts/tools/sign code azure-key-vault "**/*.nupkg" --timestamp-url "http://timestamp.digicert.com" --base-directory "${{ github.workspace }}/artifacts/pkg" --file-list "${{ github.workspace }}/scripts/SignClientFileList.txt" --publisher-name "TerraFX" --description "TerraFX.Interop.PulseAudio" --description-url "https://github.com/terrafx/terrafx.interop.pulseaudio" --azure-key-vault-certificate "${{ secrets.SC_KEY_VAULT_CERTIFICATE_ID }}" --azure-key-vault-client-id "${{ secrets.SC_AZURE_CLIENT_ID }}" --azure-key-vault-client-secret "${{ secrets.SC_AZURE_CLIENT_SECRET }}" --azure-key-vault-tenant-id "${{ secrets.SC_AZURE_TENANT_ID }}" --azure-key-vault-url "${{ secrets.SC_KEY_VAULT_URL }}"
- uses: actions/upload-artifact@v3
with:
name: sign_nuget_release
path: |
./artifacts/pkg/**/*
if-no-files-found: error
publish-nightlies-azure:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
needs: [ windows-x64, windows-x86, linux-x64, macos-x64, build-nuget-preview ]
needs: [ windows-x64, windows-x86, linux-x64, macos-x64, sign-nuget-preview ]
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: windows_release_x64
path: ./artifacts
Expand All @@ -143,9 +190,9 @@ jobs:
publish-nightlies-github:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
needs: [ windows-x64, windows-x86, linux-x64, macos-x64, build-nuget-preview ]
needs: [ windows-x64, windows-x86, linux-x64, macos-x64, sign-nuget-preview ]
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: windows_release_x64
path: ./artifacts
Expand Down

0 comments on commit 2992676

Please sign in to comment.