Skip to content

Commit 46da1ed

Browse files
committed
fix(actions): use dotnet publish
1 parent 5b6d195 commit 46da1ed

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

.github/workflows/dotnet-winui3.yml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,36 +40,19 @@ jobs:
4040
- name: Setup MSBuild.exe
4141
uses: microsoft/setup-msbuild@v1.0.2
4242

43-
# Restore the application to populate the obj folder with RuntimeIdentifiers
44-
- name: Restore the application
45-
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
46-
env:
47-
Configuration: ${{ matrix.configuration }}
48-
49-
# Decode the base 64 encoded pfx and save the Signing_Certificate
50-
- name: Decode the pfx
51-
run: |
52-
$pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.BASE64_ENCODED_PFX }}")
53-
$certificatePath = "GitHubActionsWorkflow.pfx"
54-
[IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte)
55-
5643
# Create the app package by building and packaging the project
5744
- name: Create the app package
58-
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration /p:Platform=$env:Platform /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=${{ github.workspace }}\GitHubActionsWorkflow.pfx /p:AppxPackageDir="$env:Appx_Package_Dir"
45+
run: dotnet publish -r win-$env:Platform -p:PublishSingleFile=true --self-contained true /p:WindowsAppSDKSelfContained=true /p:PublishReadyToRun=true
5946
env:
6047
Appx_Bundle: Never
6148
Appx_Package_Build_Mode: SideloadOnly
6249
Appx_Package_Dir: Packages/
6350
Configuration: ${{ matrix.configuration }}
6451
Platform: ${{ matrix.platform }}
6552

66-
# Remove the pfx
67-
- name: Remove the pfx
68-
run: Remove-Item -path GitHubActionsWorkflow.pfx
69-
7053
# Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact
7154
- name: Upload MSIX package
7255
uses: actions/upload-artifact@v2
7356
with:
74-
name: MSIX Package
75-
path: Crimson\Packages\
57+
name: Package
58+
path: Crimson\bin\x64\Release\net8.0-windows10.0.19041.0\win-x64\publish\

0 commit comments

Comments
 (0)