File tree Expand file tree Collapse file tree 2 files changed +26
-5
lines changed Expand file tree Collapse file tree 2 files changed +26
-5
lines changed Original file line number Diff line number Diff line change 6
6
- main
7
7
- dev
8
8
9
+ permissions :
10
+ id-token : write
11
+ attestations : write
12
+
9
13
jobs :
10
14
build :
11
15
runs-on : windows-latest
16
20
uses : ./
17
21
with :
18
22
sourceDir : " ./tests"
19
- - name : " Upload Artifact"
23
+ - name : " Upload Build Artifact"
20
24
uses : actions/upload-artifact@v4
25
+ id : " upload"
21
26
with :
22
- name : " VBA-Enabled Workbook "
27
+ name : " VBA-Enabled-Documents "
23
28
path : " ./tests/out/*"
24
- if-no-files-found : warn
29
+ if-no-files-found : warn
30
+ - name : " Upload Screenshots"
31
+ uses : actions/upload-artifact@v4
32
+ with :
33
+ name : " Screenshots"
34
+ path : " ./tests/screenshots/*"
35
+ if-no-files-found : warn
36
+ - name : " Attestation"
37
+ uses : actions/attest-build-provenance@v2
38
+ with :
39
+ subject-name : " VBA-Enabled-Documents"
40
+ subject-digest : sha256:${{ steps.upload.outputs.artifact-digest }}
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ if (-not (Test-VBOMAccess -officeAppName $officeAppName)) {
80
80
$officeApp = New-Object - ComObject " $officeAppName .Application"
81
81
82
82
# Make app visible (uncomment if needed)
83
- # $officeApp.Visible = $true
83
+ $officeApp.Visible = $true
84
84
85
85
# Check if the application instance was created successfully
86
86
if ($null -eq $officeApp ) {
@@ -159,7 +159,12 @@ $basFiles | ForEach-Object {
159
159
# Take a screenshot of the Office application
160
160
$scriptPath = Split-Path - Parent $MyInvocation.MyCommand.Path
161
161
. " $scriptPath /utils/Screenshot.ps1"
162
- Take- Screenshot - OutputPath " ${outputDir} Screenshot_${fileNameNoExt} .png"
162
+ $screenshotDir = (DirUp $outputDir ) + " /screenshots"
163
+ if (-not (Test-Path $screenshotDir )) {
164
+ New-Item - ItemType Directory - Path $screenshotDir - Force | Out-Null
165
+ Write-Host " Created screenshot directory: $screenshotDir "
166
+ }
167
+ Take- Screenshot - OutputPath " ${$screenshotDir} Screenshot_${fileNameNoExt} .png"
163
168
164
169
# Save the document
165
170
$doc.Save ()
You can’t perform that action at this time.
0 commit comments