Files
Appx-Packer/.github/workflows/Sign.yml
2025-03-06 12:50:48 -05:00

55 lines
1.9 KiB
YAML

name: Self-Sign MSIX Package
on: [push, pull_request]
jobs:
self-sign-msix:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download and Install Required Dependencies for Winget
run: |
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile VCLibs.appx
Invoke-WebRequest -Uri https://aka.ms/Microsoft.UI.Xaml.2.8 -OutFile UI.Xaml.appx
Invoke-WebRequest -Uri https://github.com/microsoft/winget-cli/releases/download/v1.10.340/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -OutFile winget.msixbundle
Start-Process msixbundleinstaller.exe -ArgumentList "VCLibs.appx", "UI.Xaml.appx", "winget.msixbundle" -NoNewWindow -Wait
shell: pwsh
- name: Install MSIX Hero and wingetcreate
run: |
winget install msixhero --silent --accept-source-agreements --accept-package-agreements
winget install wingetcreate --disable-interactivity --accept-source-agreements
shell: pwsh
- name: Generate Self-Signed Certificate
run: |
$certPath = "selfsign.pfx"
$password = "selfsignpassword"
"C:\Program Files\MSIX Hero\msixhero.exe" cert-new `
--name "MySelfSignedCert" `
--out "$certPath" `
--password "$password"
shell: pwsh
- name: Self-Sign MSIX Package
run: |
$certPath = "selfsign.pfx"
$password = "selfsignpassword"
$msixFile = "./sdl-min_1.0.0.0_x64.msix"
"C:\Program Files\MSIX Hero\msixhero.exe" sign `
--file "$msixFile" `
--cert "$certPath" `
--cert-password "$password"
shell: pwsh
- name: Archive and Upload Signed MSIX
uses: actions/upload-artifact@v4
with:
name: Signed-MSIX
path: ./sdl-min_1.0.0.0_x64.msix