Skip to content

Commit f28f9e8

Browse files
authored
Create BuildIt.yml
1 parent 1038a66 commit f28f9e8

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/BuildIt.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: BuildIt
2+
on:
3+
- workflow_dispatch
4+
5+
permissions:
6+
id-token: write
7+
attestations: write
8+
9+
jobs:
10+
build:
11+
runs-on: windows-latest
12+
steps:
13+
- name: "Checkout"
14+
uses: actions/checkout@v4
15+
- name: "Build VBA-Enabled Documents"
16+
id: build_vba
17+
uses: DecimalTurn/VBA-Build@0e9bb22735194c1d7d6ebe30367a623a17e64cc1 #v1.1.0
18+
with:
19+
source-dir: "./src"
20+
timeout-minutes: 10
21+
- name: "Display Chocolatey logs in case of Office install failure"
22+
if: failure() && steps.build_vba.outcome == 'failure'
23+
run: |
24+
if (Test-Path -Path "C:\ProgramData\chocolatey\logs\chocolatey.log") {
25+
Write-Host "============ Chocolatey Log Contents ============"
26+
Get-Content -Path "C:\ProgramData\chocolatey\logs\chocolatey.log"
27+
Write-Host "================================================="
28+
} else {
29+
Write-Host "Chocolatey log file not found at C:\ProgramData\chocolatey\logs\chocolatey.log"
30+
}
31+
shell: pwsh
32+
- name: "Upload Build Artifact"
33+
uses: actions/upload-artifact@v4
34+
id: "upload"
35+
with:
36+
name: "VBA-Enabled-Documents"
37+
path: "./src/out/*"
38+
if-no-files-found: warn
39+
- name: "Attestation"
40+
uses: actions/attest-build-provenance@v2
41+
with:
42+
subject-name: "VBA-Enabled-Documents"
43+
subject-digest: sha256:${{ steps.upload.outputs.artifact-digest }}

0 commit comments

Comments
 (0)