windows testing #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows Signing | |
on: | |
- workflow_dispatch | |
- push | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
prereqs: | |
name: Prerequisites | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set version | |
run: echo "version=$(cat VERSION | sed -E 's/.[0-9]+$//')" >> $GITHUB_OUTPUT | |
id: version | |
# ================================ | |
# Windows | |
# ================================ | |
create-windows-release-assets: | |
name: Create Windows Release Assets | |
runs-on: windows-latest | |
environment: release | |
needs: prereqs | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up .NET | |
uses: actions/setup-dotnet@v3.2.0 | |
with: | |
dotnet-version: 6.0.x | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: | | |
dotnet build --configuration=WindowsRelease | |
- name: Run Windows unit tests | |
run: | | |
dotnet test --configuration=WindowsRelease | |
- name: Lay out Windows payload and symbols | |
shell: pwsh | |
run: | | |
cd src/windows/Installer.Windows/ | |
./layout.ps1 -Configuration WindowsRelease ` | |
-Output $env:GITHUB_WORKSPACE/payload ` | |
-SymbolOutput $env:GITHUB_WORKSPACE/symbols | |
- name: Log into Azure | |
uses: azure/login@v1 | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
- name: Sign payload files with Azure Code Signing | |
uses: azure/azure-code-signing-action@v0.2.20 | |
with: | |
endpoint: https://wus2.codesigning.azure.net/ | |
code-signing-account-name: git-fundamentals-signing | |
certificate-profile-name: git-fundamentals-windows-signing | |
files-folder: ${{ github.workspace }}/payload | |
files-folder-filter: exe,dll | |
file-digest: SHA256 | |
timestamp-rfc3161: http://timestamp.acs.microsoft.com | |
timestamp-digest: SHA256 | |
- name: Build with signed payload | |
shell: pwsh | |
run: | | |
dotnet build $env:GITHUB_WORKSPACE/src/windows/Installer.Windows ` | |
/p:PayloadPath=$env:GITHUB_WORKSPACE/payload /p:NoLayout=true ` | |
--configuration=WindowsRelease --output=$env:GITHUB_WORKSPACE/installers | |
- name: Sign installers with Azure Code Signing | |
uses: azure/azure-code-signing-action@v0.2.20 | |
with: | |
endpoint: https://wus2.codesigning.azure.net/ | |
code-signing-account-name: git-fundamentals-signing | |
certificate-profile-name: git-fundamentals-windows-signing | |
files-folder: ${{ github.workspace }}/installers | |
files-folder-filter: exe | |
file-digest: SHA256 | |
timestamp-rfc3161: http://timestamp.acs.microsoft.com | |
timestamp-digest: SHA256 | |
- name: Publish final artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: windows-aritfacts | |
path: | | |
payload | |
installers | |
symbols |