Skip to content

bump

bump #70

Workflow file for this run

name: Build
on:
push:
tags:
- 'v[0-9]*'
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Lua 5.4
shell: cmd
run: |
7z x tools\lua-5.4.2_Win32_bin.zip -oC:\lua54
copy C:\lua54\lua54.exe C:\lua54\lua.exe
echo C:\lua54>> "%GITHUB_PATH%"
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Azure Login
if: startsWith(github.ref, 'refs/tags/v')
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Install Trusted Signing Client
if: startsWith(github.ref, 'refs/tags/v')
shell: pwsh
run: |
nuget install Microsoft.ArtifactSigning.Client -OutputDirectory .\packages
- name: Setup Zig
uses: mlugg/setup-zig@v2
with:
version: 0.15.1
- name: Run tests
run: zig build test --summary all
- name: Build framework XLL
run: zig build --release=fast
- name: Upload framework XLL artifact
uses: actions/upload-artifact@v4
with:
name: zigxll-framework
path: zig-out/lib/output.xll
if-no-files-found: error
- name: Build example XLL
working-directory: example
run: zig build --release=fast
- name: Sign example XLL
if: startsWith(github.ref, 'refs/tags/v')
shell: pwsh
run: |
$dlib = Get-ChildItem -Path ".\packages" -Recurse -Filter "Azure.CodeSigning.Dlib.dll" |
Where-Object { $_.FullName -like "*x64*" } |
Select-Object -First 1 -ExpandProperty FullName
$signtool = Get-ChildItem -Path "C:\Program Files (x86)\Windows Kits\10\bin\*\x64\signtool.exe" |
Sort-Object { [version]($_.Directory.Parent.Name) } -Descending |
Select-Object -First 1 -ExpandProperty FullName
& $signtool sign /v /fd SHA256 `
/tr "http://timestamp.acs.microsoft.com" /td SHA256 `
/dlib "$dlib" `
/dmdf ".\signing-metadata.json" `
"example\zig-out\lib\my_excel_functions.xll"
- name: Upload example XLL artifact
uses: actions/upload-artifact@v4
with:
name: zigxll-example
path: example/zig-out/lib/my_excel_functions.xll
if-no-files-found: error
- name: Create release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: |
zig-out/lib/output.xll
example/zig-out/lib/my_excel_functions.xll
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}