Skip to content

Commit

Permalink
updated pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jformacek committed Nov 18, 2023
1 parent 5cd546d commit 496d83b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/Publish-CosmosLite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,37 @@ jobs:
run: |
Install-Module AadAuthenticationFactory -AllowPrerelease -Force -Scope CurrentUser -Verbose
- name: Install AzureSignTool
shell: pwsh
run: |
dotnet tool install --global AzureSignTool
- name: Sign files
shell: pwsh
run: |
$files = Get-ChildItem "$env:GITHUB_WORKSPACE\Module" -File -Recurse -Include *.ps1, *.ps1xml, *.psd1, *.psm1, *.pssc, *.psrc, *.cdxml
try {
foreach ($file in $files) {
azuresigntool sign `
-kvu ${{ vars.CODESIGNING_KEYVAULTURI }} `
-kvi ${{ vars.TENANTINTEGRATION_CLIENTID }} `
-kvt ${{ vars.TENANTINTEGRATION_TENANTID }} `
-kvs ${{ secrets.TENANTINTEGRATION_CLIENTSECRET }} `
-kvc ${{ vars.CODESIGNING_CERTNAME }} `
-tr 'http://timestamp.digicert.com' `
-v "$($file.FullName)"
}
}
catch {
Write-Host "Error: $($_.Exception)"
throw
}
Write-Host "Signed files summary:"
Get-AuthenticodeSignature -FilePath $files
- name: Publish
#Publish to PS Gallery
if: ${{ github.event_name != 'workflow_dispatch' }}
shell: pwsh
env:
SECRET: ${{ secrets.PSGallery_APIKey }}
Expand Down

0 comments on commit 496d83b

Please sign in to comment.