-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (75 loc) · 2.72 KB
/
Copy pathbuild.yml
File metadata and controls
89 lines (75 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: build
on:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
configuration: [Release]
platform: [x64,arm64]
runs-on: windows-2025-vs2026
env:
Solution_Name: src\ContextMenuBuilder.slnx
Appx_Package_Dir: ${{github.workspace}}\Packages\
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/checkout@v6
with:
repository: ikas-mc/ContextMenuForWindows11
ref: 'dev'
fetch-depth: 1
path: ContextMenuForWindows11
lfs: true
- uses: actions/checkout@v6
with:
repository: ikas-mc/ContextMenuBuilderPoc
ref: 'dev'
fetch-depth: 1
token: ${{ secrets.GH_PAT }}
path: src
lfs: true
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
- name: Update Version Build Number
working-directory: ${{github.workspace}}
run: |
$env:VERSION_BUILD_NUMBER = "${{github.run_number}}"
cd src
.\update-version.ps1
- 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 = "GitHubActionsWorkflow.pfx"
[IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte)
- name: Create the app package
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=${{env.CertFile}} /p:PackageCertificatePassword=${{ secrets.Pfx_Key }} /p:AppxPackageDir="$env:Appx_Package_Dir" /p:GenerateAppxPackageOnBuild=true
env:
Appx_Bundle: Never
Appx_Package_Build_Mode: SideloadOnly
Configuration: ${{ matrix.configuration }}
Platform: ${{ matrix.platform }}
CertFile: ${{github.workspace}}\GitHubActionsWorkflow.pfx
- name: Remove the pfx
run: Remove-Item -path GitHubActionsWorkflow.pfx
- name: Upload Deps
uses: actions/upload-artifact@v7
with:
name: ContextMenuBuilder-Deps-${{ matrix.platform }}
archive: true
path: |
${{env.Appx_Package_Dir}}\*\Dependencies\${{ matrix.platform }}\*
- name: Upload Package
uses: actions/upload-artifact@v7
with:
name: ContextMenuBuilder-${{ matrix.platform }}-${{ matrix.configuration }}
archive: true
path: |
${{env.Appx_Package_Dir}}\*\*.msix
${{env.Appx_Package_Dir}}\*\*.cer