Skip to content

Commit 946400d

Browse files
committed
Add azure signing
1 parent 9b08680 commit 946400d

1 file changed

Lines changed: 31 additions & 4 deletions

File tree

.github/workflows/publish_winuiex_nuget.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,38 @@ jobs:
2323
run: |
2424
msbuild /restore /t:Build src/WinUIEx/WinUIEx.csproj /p:Configuration=Release
2525
26-
2726
- name: Pack
2827
run: |
2928
msbuild /t:Pack src/WinUIEx/WinUIEx.csproj /p:Configuration=Release /p:NoBuild=true
3029
30+
- name: Set up .NET for package signing
31+
uses: actions/setup-dotnet@v5
32+
with:
33+
dotnet-version: 10.0.x
34+
35+
- name: Azure login
36+
uses: azure/login@v3
37+
with:
38+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
39+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
40+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
41+
42+
- name: Install Sign CLI
43+
run: |
44+
dotnet tool install --global sign --version 0.9.1-beta.26330.1
45+
46+
- name: Sign NuGet package and contained DLLs
47+
run: |
48+
sign code artifact-signing artifacts\NuGet\Release\*.nupkg `
49+
--artifact-signing-endpoint ${{ vars.AZURE_ARTIFACT_SIGNING_ENDPOINT }} `
50+
--artifact-signing-account ${{ vars.AZURE_ARTIFACT_SIGNING_ACCOUNT }} `
51+
--artifact-signing-certificate-profile ${{ vars.AZURE_ARTIFACT_SIGNING_CERTIFICATE_PROFILE }} `
52+
--azure-credential-type azure-cli `
53+
--file-digest SHA256 `
54+
--timestamp-url http://timestamp.acs.microsoft.com `
55+
--timestamp-digest SHA256 `
56+
--verbosity information
57+
3158
- name: Upload artifacts
3259
uses: actions/upload-artifact@v4
3360
with:
@@ -41,6 +68,6 @@ jobs:
4168
with:
4269
user: ${{ secrets.NUGET_USER }}
4370

44-
#- name: Push to NuGet
45-
# run: |
46-
# dotnet nuget push artifacts\NuGet\Release\*.nupkg --api-key ${{steps.login.outputs.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
71+
# - name: Push to NuGet
72+
# run: |
73+
# dotnet nuget push artifacts\NuGet\Release\*.nupkg --api-key ${{steps.login.outputs.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)