Skip to content

Commit 05f2793

Browse files
Update build-and-sign-all.yml
1 parent 9e8f62a commit 05f2793

1 file changed

Lines changed: 86 additions & 70 deletions

File tree

.github/workflows/build-and-sign-all.yml

Lines changed: 86 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
BUILD_CONFIGURATION: Release
1414

1515
jobs:
16-
build-and-sign:
16+
build-all-components:
1717
runs-on: windows-latest
1818
strategy:
1919
matrix:
@@ -140,31 +140,78 @@ jobs:
140140
}
141141
continue-on-error: true
142142

143-
# Upload VDD built artifacts
144-
- name: Upload VDD artifacts
145-
id: upload_vdd_artifact
146-
uses: actions/upload-artifact@v4
147-
with:
148-
name: Built-VDD-${{ env.BUILD_CONFIGURATION }}-${{ matrix.platform }}
149-
path: |
150-
Virtual Display Driver (HDR)\${{ matrix.platform }}\${{ env.BUILD_CONFIGURATION }}\MttVDD\MttVDD.dll
151-
Virtual Display Driver (HDR)\${{ matrix.platform }}\${{ env.BUILD_CONFIGURATION }}\MttVDD\MttVDD.inf
152-
Virtual Display Driver (HDR)\${{ matrix.platform }}\${{ env.BUILD_CONFIGURATION }}\MttVDD\mttvdd.cat
153-
Virtual Display Driver (HDR)\${{ matrix.platform }}\${{ env.BUILD_CONFIGURATION }}\MttVDD\vdd_settings.xml
154-
continue-on-error: true
143+
# Create unified package for signing
144+
- name: Package all components for signing
145+
id: package_components
146+
run: |
147+
Write-Output "Creating unified package for signing..."
148+
$packageDir = "unified-driver-package-${{ matrix.platform }}"
149+
$zipFile = "${packageDir}.zip"
150+
151+
# Create package directory
152+
New-Item -ItemType Directory -Path $packageDir -Force
153+
154+
# Copy VDD files
155+
$vddDir = "Virtual Display Driver (HDR)\${{ matrix.platform }}\${{ env.BUILD_CONFIGURATION }}\MttVDD"
156+
if (Test-Path $vddDir) {
157+
Write-Output "Copying VDD files..."
158+
$vddPackageDir = "$packageDir\VDD"
159+
New-Item -ItemType Directory -Path $vddPackageDir -Force
160+
Copy-Item "$vddDir\*" -Destination $vddPackageDir -Force
161+
Write-Output "VDD files copied to package"
162+
} else {
163+
Write-Output "Warning: VDD build directory not found"
164+
}
165+
166+
# Copy VAD files
167+
Write-Output "Searching for VAD files..."
168+
$vadFiles = Get-ChildItem -Path "Virtual-Audio-Driver (Latest Stable)" -Recurse -Include "*.sys", "*.inf", "*.cat", "*.dll" -ErrorAction SilentlyContinue
169+
if ($vadFiles.Count -gt 0) {
170+
$vadPackageDir = "$packageDir\VAD"
171+
New-Item -ItemType Directory -Path $vadPackageDir -Force
172+
foreach ($file in $vadFiles) {
173+
Copy-Item $file.FullName -Destination $vadPackageDir -Force
174+
Write-Output "Copied VAD file: $($file.Name)"
175+
}
176+
} else {
177+
Write-Output "Warning: No VAD files found"
178+
}
179+
180+
# Copy Control Panel files
181+
if (Test-Path "control-panel-publish") {
182+
Write-Output "Copying Control Panel files..."
183+
$controlPackageDir = "$packageDir\ControlPanel"
184+
New-Item -ItemType Directory -Path $controlPackageDir -Force
185+
Copy-Item "control-panel-publish\*" -Destination $controlPackageDir -Recurse -Force
186+
Write-Output "Control Panel files copied to package"
187+
} else {
188+
Write-Output "Warning: Control Panel build not found"
189+
}
190+
191+
# Create ZIP file
192+
Write-Output "Creating ZIP file: $zipFile"
193+
Compress-Archive -Path $packageDir -DestinationPath $zipFile -Force
194+
195+
# Verify ZIP contents
196+
if (Test-Path $zipFile) {
197+
$zipSize = (Get-Item $zipFile).Length
198+
Write-Output "✅ Package created successfully: $zipFile (${zipSize} bytes)"
199+
Write-Output "PACKAGE_PATH=$zipFile" >> $env:GITHUB_ENV
200+
Write-Output "PACKAGE_NAME=$packageDir" >> $env:GITHUB_ENV
201+
} else {
202+
Write-Output "❌ Failed to create package"
203+
exit 1
204+
}
205+
continue-on-error: false
155206

156-
# Upload VAD built artifacts
157-
- name: Upload VAD artifacts
158-
id: upload_vad_artifact
207+
# Upload unified package
208+
- name: Upload unified package
209+
id: upload_unified_package
159210
uses: actions/upload-artifact@v4
160211
with:
161-
name: Built-VAD-${{ env.BUILD_CONFIGURATION }}-${{ matrix.platform }}
162-
path: |
163-
Virtual-Audio-Driver (Latest Stable)\${{ matrix.platform }}\${{ env.BUILD_CONFIGURATION }}\**\*.sys
164-
Virtual-Audio-Driver (Latest Stable)\${{ matrix.platform }}\${{ env.BUILD_CONFIGURATION }}\**\*.inf
165-
Virtual-Audio-Driver (Latest Stable)\${{ matrix.platform }}\${{ env.BUILD_CONFIGURATION }}\**\*.cat
166-
Virtual-Audio-Driver (Latest Stable)\${{ matrix.platform }}\${{ env.BUILD_CONFIGURATION }}\**\*.dll
167-
continue-on-error: true
212+
name: Unified-Driver-Package-${{ env.BUILD_CONFIGURATION }}-${{ matrix.platform }}
213+
path: ${{ env.PACKAGE_PATH }}
214+
continue-on-error: false
168215
# Generate release tag
169216
- name: Generate release tag
170217
id: generate_tag
@@ -173,36 +220,17 @@ jobs:
173220
Write-Output "Generated release tag: $releaseTag"
174221
echo "RELEASE_TAG=$releaseTag" >> $env:GITHUB_ENV
175222
176-
# Submit VDD to SignPath (only for main branch and tags)
177-
- name: Submit VDD to SignPath for signing
178-
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && steps.upload_vdd_artifact.outputs.artifact-id != ''
179-
id: signpath_vdd_request
223+
# Submit unified package to SignPath (only for main branch and tags)
224+
- name: Submit unified package to SignPath for signing
225+
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && steps.upload_unified_package.outputs.artifact-id != ''
226+
id: signpath_unified_request
180227
uses: signpath/github-action-submit-signing-request@v1
181228
with:
182229
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
183230
organization-id: '${{ vars.SIGNPATH_ORG_ID }}'
184231
project-slug: '${{ vars.SIGNPATH_PROJECT_SLUG }}'
185232
signing-policy-slug: '${{ vars.SIGNPATH_POLICY_SLUG }}'
186-
github-artifact-id: '${{ steps.upload_vdd_artifact.outputs.artifact-id }}'
187-
wait-for-completion: true
188-
output-artifact-directory: '${{ vars.SIGNPATH_OUTPUT_DIR }}'
189-
parameters: |
190-
Version: ${{ toJSON(env.BUILD_CONFIGURATION) }}
191-
Release_Tag: "${{ env.RELEASE_TAG }}"
192-
Platform: "${{ matrix.platform }}"
193-
continue-on-error: true
194-
195-
# Submit VAD to SignPath (only for main branch and tags)
196-
- name: Submit VAD to SignPath for signing
197-
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && steps.upload_vad_artifact.outputs.artifact-id != ''
198-
id: signpath_vad_request
199-
uses: signpath/github-action-submit-signing-request@v1
200-
with:
201-
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
202-
organization-id: '${{ vars.SIGNPATH_ORG_ID }}'
203-
project-slug: '${{ vars.SIGNPATH_PROJECT_SLUG }}'
204-
signing-policy-slug: '${{ vars.SIGNPATH_POLICY_SLUG }}'
205-
github-artifact-id: '${{ steps.upload_vad_artifact.outputs.artifact-id }}'
233+
github-artifact-id: '${{ steps.upload_unified_package.outputs.artifact-id }}'
206234
wait-for-completion: true
207235
output-artifact-directory: '${{ vars.SIGNPATH_OUTPUT_DIR }}'
208236
parameters: |
@@ -211,21 +239,12 @@ jobs:
211239
Platform: "${{ matrix.platform }}"
212240
continue-on-error: true
213241

214-
# Upload signed VDD artifacts
215-
- name: Upload signed VDD artifacts
216-
if: steps.signpath_vdd_request.outcome == 'success'
217-
uses: actions/upload-artifact@v4
218-
with:
219-
name: Signed-VDD-${{ env.BUILD_CONFIGURATION }}-${{ matrix.platform }}
220-
path: '${{ vars.SIGNPATH_OUTPUT_DIR }}\*'
221-
continue-on-error: true
222-
223-
# Upload signed VAD artifacts
224-
- name: Upload signed VAD artifacts
225-
if: steps.signpath_vad_request.outcome == 'success'
242+
# Upload signed unified package
243+
- name: Upload signed unified package
244+
if: steps.signpath_unified_request.outcome == 'success'
226245
uses: actions/upload-artifact@v4
227246
with:
228-
name: Signed-VAD-${{ env.BUILD_CONFIGURATION }}-${{ matrix.platform }}
247+
name: Signed-Unified-Package-${{ env.BUILD_CONFIGURATION }}-${{ matrix.platform }}
229248
path: '${{ vars.SIGNPATH_OUTPUT_DIR }}\*'
230249
continue-on-error: true
231250

@@ -243,19 +262,16 @@ jobs:
243262
Write-Output "This workflow successfully:"
244263
Write-Output "✅ Built Virtual Display Driver (VDD) with proper Windows Driver Kit dependencies"
245264
Write-Output "✅ Built Virtual Audio Driver (VAD) for ${{ matrix.platform }} architecture"
246-
Write-Output "✅ Uploaded driver artifacts to GitHub Actions"
247-
Write-Output "✅ Submitted drivers to SignPath for code signing with origin verification"
265+
Write-Output "✅ Built Control Panel application"
266+
Write-Output "✅ Created unified package containing all components"
267+
Write-Output "✅ Uploaded unified package to GitHub Actions"
268+
Write-Output "✅ Submitted unified package to SignPath for code signing with origin verification"
248269
Write-Output "✅ Generated automatic release tags for version tracking"
249270
Write-Output "✅ Supports both x64 and ARM64 architectures via matrix builds"
250271
Write-Output ""
251272
Write-Output "SignPath Integration Status:"
252-
if ('${{ steps.signpath_vdd_request.outcome }}' -eq 'success') {
253-
Write-Output "✅ VDD submitted and signed successfully"
254-
} else {
255-
Write-Output "❌ VDD signing failed or skipped"
256-
}
257-
if ('${{ steps.signpath_vad_request.outcome }}' -eq 'success') {
258-
Write-Output "✅ VAD submitted and signed successfully"
273+
if ('${{ steps.signpath_unified_request.outcome }}' -eq 'success') {
274+
Write-Output "✅ Unified package submitted and signed successfully"
259275
} else {
260-
Write-Output "❌ VAD signing failed or skipped"
276+
Write-Output "❌ Unified package signing failed or skipped"
261277
}

0 commit comments

Comments
 (0)