@@ -17,7 +17,10 @@ permissions:
17
17
18
18
jobs :
19
19
release :
20
- runs-on : ubuntu-24.04
20
+ runs-on : windows-latest
21
+ environment : Signing
22
+ permissions :
23
+ id-token : write # Required for Azure CLI Login
21
24
steps :
22
25
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
23
26
@@ -79,22 +82,28 @@ jobs:
79
82
run-id : ${{ steps.findrunid.outputs.runid }}
80
83
github-token : ${{ github.token }}
81
84
85
+ # Login to Azure using a ServicePrincipal configured to authenticate agaist a GitHub Action
86
+ - name : 🪪 Authorize signing
87
+
88
+ with :
89
+ client-id : ${{ vars.AZURE_CLIENT_ID }}
90
+ tenant-id : ${{ vars.AZURE_TENANT_ID }}
91
+ subscription-id : ${{ vars.AZURE_SUBSCRIPTION_ID }}
92
+
82
93
- name : 🔏 Code sign
83
- shell : pwsh
84
94
run : >
85
95
rm global.json # avoid a need to install a particular SDK version
86
96
87
- dotnet tool install --tool-path obj SignClient
97
+ dotnet tool install --tool-path obj --prerelease sign
88
98
89
- obj/SignClient sign
90
- --baseDirectory '${{ runner.temp }}/deployables'
91
- --input '**/*'
92
- --config '${{ github.workspace }}/.github/SignClient.json'
93
- --filelist '${{ github.workspace }}/.github/signfiles.txt'
94
- --user '${{ secrets.CODESIGN_USERNAME }}'
95
- --secret '${{ secrets.CODESIGN_SECRET }}'
96
- --name 'Nerdbank.GitVersioning'
97
- --descriptionUrl 'https://github.com/dotnet/Nerdbank.GitVersioning'
99
+ obj/sign code azure-key-vault
100
+ '**/*'
101
+ --base-directory '${{ runner.temp }}/deployables'
102
+ --file-list '${{ github.workspace }}/.github/signfiles.txt'
103
+ --azure-key-vault-url "${{ vars.KEY_VAULT_URL }}"
104
+ --azure-key-vault-certificate "${{ vars.KEY_VAULT_CERTIFICATE }}"
105
+ --azure-credential-type azure-cli
106
+ shell : pwsh
98
107
99
108
- name : 💽 Upload artifacts to release
100
109
shell : pwsh
@@ -108,7 +117,7 @@ jobs:
108
117
}
109
118
110
119
- name : 🚀 Push NuGet packages
111
- run : dotnet nuget push ${{ runner.temp }}/ deployables/ *.nupkg --source https://api.nuget.org/v3/index.json -k '${{ secrets.NUGET_API_KEY }}'
120
+ run : dotnet nuget push ${{ runner.temp }}\ deployables\ *.nupkg --source https://api.nuget.org/v3/index.json -k '${{ secrets.NUGET_API_KEY }}'
112
121
if : ${{ env.NUGET_API_KEY_DEFINED == 'true' }}
113
122
114
123
- name : 🚀 Push NPM packages
0 commit comments