Skip to content

Commit 2e195a0

Browse files
committed
更新 Github Action
1 parent 0344ad9 commit 2e195a0

File tree

3 files changed

+28
-24
lines changed

3 files changed

+28
-24
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# This workflow will build, sign, and package a WinUI 3 MSIX desktop application
1+
# This workflow will build and publish a WinUI 3 unpackaged desktop application
22
# built on .NET.
33

4-
name: WinUI 3 MSIX app
4+
name: WinUI 3 unpackaged app
55

66
on:
77
push:
@@ -52,30 +52,16 @@ jobs:
5252
env:
5353
Configuration: ${{ matrix.configuration }}
5454

55-
# Decode the base 64 encoded pfx and save the Signing_Certificate
56-
- name: Decode the pfx
57-
run: |
58-
$pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.BASE64_ENCODED_PFX }}")
59-
$certificatePath = "GitHubActionsWorkflow.pfx"
60-
[IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte)
61-
62-
# Create the app package by building and packaging the project
63-
- name: Create the app package
64-
run: msbuild $env:Edge /p:Configuration=$env:Configuration /p:Platform=$env:Platform /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:AppxPackageDir="$env:Appx_Package_Dir" /p:GenerateAppxPackageOnBuild=true
55+
# Create the app by building and publishing the project
56+
- name: Create the app
57+
run: msbuild $env:Edge /t:Publish /p:Configuration=$env:Configuration /p:Platform=$env:Platform
6558
env:
66-
Appx_Bundle: Never
67-
Appx_Package_Build_Mode: SideloadOnly
68-
Appx_Package_Dir: Packages\
6959
Configuration: ${{ matrix.configuration }}
7060
Platform: ${{ matrix.platform }}
7161

72-
# Remove the pfx
73-
- name: Remove the pfx
74-
run: Remove-Item -path GitHubActionsWorkflow.pfx
75-
76-
# Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact
77-
- name: Upload MSIX package
62+
# Upload the app
63+
- name: Upload app
7864
uses: actions/upload-artifact@v4.5.0
7965
with:
80-
name: Edge-nightly-build-${{ steps.date.outputs.date }}
81-
path: ${{ github.workspace }}\\Packages
66+
name: Edge-${{ steps.date.outputs.date }}
67+
path: ${{ github.workspace }}\\bin\\win-${{ matrix.platform }}\\publish

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ publish/
184184
*.azurePubxml
185185
# Note: Comment the next line if you want to checkin your web deploy settings,
186186
# but database connection strings (with potential passwords) will be unencrypted
187-
*.pubxml
187+
# *.pubxml
188188
*.publishproj
189189

190190
# Microsoft Azure Web App publish settings. Comment the next line if you want to
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6+
<PropertyGroup>
7+
<PublishProtocol>FileSystem</PublishProtocol>
8+
<Platform>x64</Platform>
9+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
10+
<PublishDir>bin\\\win-x64\publish\</PublishDir>
11+
<SelfContained>true</SelfContained>
12+
<PublishSingleFile>false</PublishSingleFile>
13+
<Configuration>Release</Configuration>
14+
<TargetFramework>net9.0-windows10.0.26100.0</TargetFramework>
15+
<PublishReadyToRun>false</PublishReadyToRun>
16+
<PublishTrimmed>false</PublishTrimmed>
17+
</PropertyGroup>
18+
</Project>

0 commit comments

Comments
 (0)