Skip to content

Commit

Permalink
Update dotnet-desktop.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ledrunning authored Feb 4, 2024
1 parent 944a7dd commit 69be1ea
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:

env:
Solution_Name: FaceDetectionApp.sln

steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -25,30 +26,19 @@ jobs:
- name: Install .NET Framework
uses: microsoft/[email protected]

- name: Execute unit tests
run: dotnet test ${{ env.Test_Project_Path }}

- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}

- name: Decode the pfx
run: |
$pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}")
$certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath GitHubActionsWorkflow.pfx
[IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte)
- name: Create the app package
run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=StoreUpload /p:AppxBundle=Always /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }}
- name: Build the application
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}

- name: Remove the pfx
run: Remove-Item -path $env:Wap_Project_Directory\GitHubActionsWorkflow.pfx

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: MSIX Package
path: ${{ env.Wap_Project_Directory }}\AppPackages
name: Compiled Artifacts
path: |
Path\To\Your\Project\bin\${{ matrix.configuration }}

0 comments on commit 69be1ea

Please sign in to comment.