Skip to content

Commit

Permalink
Update dotnet-desktop.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciobellon authored Jun 11, 2024
1 parent 8e06b45 commit d27b491
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ jobs:

env:
Solution_Name: RoundedWindowsEdges.sln
Test_Project_Path: RoundedWindowsEdges.Tests/RoundedWindowsEdges.Tests.csproj
Wap_Project_Directory: RoundedWindowsEdges.Package
Wap_Project_Path: RoundedWindowsEdges.Package/RoundedWindowsEdges.Package.wapproj

steps:
- name: Checkout
Expand All @@ -34,33 +31,18 @@ jobs:
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2

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

- name: Restore the application
run: msbuild ${{ env.Solution_Name }} /t:Restore /p:Configuration=${{ matrix.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=${{ matrix.configuration }} /p:UapAppxPackageBuildMode=${{ env.Appx_Package_Build_Mode }} /p:AppxBundle=${{ env.Appx_Bundle }} /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }}
- name: Build the application
run: msbuild ${{ env.Solution_Name }} /p:Configuration=${{ matrix.configuration }}
env:
Appx_Bundle: Always
Appx_Bundle_Platforms: x86|x64
Appx_Package_Build_Mode: StoreUpload
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: Build
path: '**/bin/${{ matrix.configuration }}/**/*'

0 comments on commit d27b491

Please sign in to comment.