name: Build MrTrust on: push: branches: - main pull_request: workflow_dispatch: jobs: build-windows: runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Verify PowerShell scripts shell: powershell run: | $scripts = @() $scripts += @(Get-ChildItem . -Filter *.ps1) $scripts += @(Get-ChildItem .\scripts -Filter *.ps1) foreach ($script in $scripts) { $tokens = $null $errors = $null [System.Management.Automation.Language.Parser]::ParseFile($script.FullName, [ref]$tokens, [ref]$errors) | Out-Null if ($errors) { throw $errors } } - name: Build release ZIP shell: powershell run: | $arguments = @("-ExecutionPolicy", "Bypass", "-File", ".\scripts\New-MrTrustRelease.ps1", "-Version", "0.1.0") if ($env:MRTRUST_SIGNING_THUMBPRINT) { $arguments += @("-SigningThumbprint", $env:MRTRUST_SIGNING_THUMBPRINT) } powershell @arguments - name: Show package contents shell: powershell run: | Get-ChildItem .\dist -Recurse | Select-Object FullName, Length - name: Upload release artifact uses: actions/upload-artifact@v3 with: name: MrTrust-0.1.0 path: dist/MrTrust-0.1.0.zip