Skip to content

Test .NET CLI on Windows Latest #15

Test .NET CLI on Windows Latest

Test .NET CLI on Windows Latest #15

Workflow file for this run

name: Test .NET CLI on Windows Latest
on:
workflow_dispatch: # This allows you to run the workflow manually from the Actions tab
jobs:
test-latest-release:
runs-on: windows-latest # Uses the latest Windows environment (Windows 11 equivalent)
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0' # Use your .NET version
- name: Install 7-Zip
run: |
choco install -y 7zip # Install 7-Zip to extract .7z files
- name: Extract Release Archive
run: |
7z x '!release\latest-unstable\LatestCli.7z' -o'release_extracted' # Extract to 'release_extracted' folder
- name: List Extracted Files
run: |
dir release_extracted # List files in the directory to confirm the .exe is present
- name: Run CLI App Help Command
shell: pwsh # Use PowerShell
run: |
Start-Process -FilePath "release_extracted\DescribeTranspiler.CLI.exe" -ArgumentList "-help auto" -NoNewWindow -Wait
if ($LASTEXITCODE -ne 0) {
Write-Host "The command failed with exit code $LASTEXITCODE. Check output.txt for details."
}
- name: List Extracted Files
run: |
dir release_extracted # List files to check for output.txt
- name: Get CLI App result
shell: pwsh # Use PowerShell
run: |
if (Test-Path output.txt) {
Get-Content output.txt # Display the contents of output.txt
} else {
Write-Host "output.txt does not exist."
}