Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 56 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
name: CI
name: Build

on:
push:
branches: [main]
pull_request:
branches: [main]
branches: [main, dev]
release:
types: [created, published]

permissions:
contents: write

jobs:
build-and-test:
runs-on: ubuntu-latest
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
Expand All @@ -34,3 +39,51 @@ jobs:

- name: Run tests
run: dotnet test tests/PlanViewer.Core.Tests/PlanViewer.Core.Tests.csproj -c Release --no-build --verbosity normal

- name: Get version
id: version
shell: pwsh
run: |
$version = ([xml](Get-Content src/PlanViewer.App/PlanViewer.App.csproj)).Project.PropertyGroup.Version | Where-Object { $_ }
echo "VERSION=$version" >> $env:GITHUB_OUTPUT

- name: Publish App
run: dotnet publish src/PlanViewer.App/PlanViewer.App.csproj -c Release -o publish/App

- name: Publish CLI
run: dotnet publish src/PlanViewer.Cli/PlanViewer.Cli.csproj -c Release -o publish/Cli

- name: Package release artifacts
if: github.event_name == 'release'
shell: pwsh
run: |
$version = "${{ steps.version.outputs.VERSION }}"
New-Item -ItemType Directory -Force -Path releases

# App ZIP
if (Test-Path 'README.md') { Copy-Item 'README.md' 'publish/App/' }
if (Test-Path 'LICENSE') { Copy-Item 'LICENSE' 'publish/App/' }
Compress-Archive -Path 'publish/App/*' -DestinationPath "releases/PerformanceStudio-$version.zip" -Force

# CLI ZIP
if (Test-Path 'LICENSE') { Copy-Item 'LICENSE' 'publish/Cli/' }
Compress-Archive -Path 'publish/Cli/*' -DestinationPath "releases/PerformanceStudioCli-$version.zip" -Force

- name: Generate checksums
if: github.event_name == 'release'
shell: pwsh
run: |
$checksums = Get-ChildItem releases/*.zip | ForEach-Object {
$hash = (Get-FileHash $_.FullName -Algorithm SHA256).Hash.ToLower()
"$hash $($_.Name)"
}
$checksums | Out-File -FilePath releases/SHA256SUMS.txt -Encoding utf8
Write-Host "Checksums:"
$checksums | ForEach-Object { Write-Host $_ }

- name: Upload release assets
if: github.event_name == 'release'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.event.release.tag_name }} releases/*.zip releases/SHA256SUMS.txt --clobber
2 changes: 1 addition & 1 deletion src/PlanViewer.App/PlanViewer.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
<Version>0.7.0</Version>
<Version>0.8.0</Version>
<Authors>Erik Darling</Authors>
<Company>Darling Data LLC</Company>
<Product>Performance Studio</Product>
Expand Down
4 changes: 2 additions & 2 deletions src/PlanViewer.Cli/PlanViewer.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<Nullable>enable</Nullable>
<RootNamespace>PlanViewer.Cli</RootNamespace>
<AssemblyName>planview</AssemblyName>
<Version>0.5.0</Version>
<Version>0.8.0</Version>
<Authors>Erik Darling</Authors>
<Company>Darling Data LLC</Company>
<Product>SQL Performance Studio</Product>
<Product>Performance Studio</Product>
<Copyright>Copyright (c) 2026 Erik Darling, Darling Data LLC</Copyright>
</PropertyGroup>

Expand Down
Loading