|
63 | 63 | dotnet publish src/PlanViewer.App/PlanViewer.App.csproj -c Release -r osx-x64 --self-contained -o publish/osx-x64 |
64 | 64 | dotnet publish src/PlanViewer.App/PlanViewer.App.csproj -c Release -r osx-arm64 --self-contained -o publish/osx-arm64 |
65 | 65 |
|
| 66 | + # ── SSMS extension VSIX (issue #343 — get it into automated builds) ── |
| 67 | + # PlanViewer.Ssms is a legacy non-SDK project and is not in PlanViewer.sln, |
| 68 | + # so the `dotnet build` above never touches it. It needs full MSBuild plus |
| 69 | + # the VSSDK build targets. continue-on-error keeps a VSIX build failure |
| 70 | + # from blocking the (critical-path) cross-platform app release. |
| 71 | + - name: Add MSBuild to PATH |
| 72 | + uses: microsoft/setup-msbuild@v2 |
| 73 | + continue-on-error: true |
| 74 | + |
| 75 | + - name: Build SSMS extension |
| 76 | + id: ssms |
| 77 | + continue-on-error: true |
| 78 | + shell: pwsh |
| 79 | + env: |
| 80 | + VERSION: ${{ steps.version.outputs.VERSION }} |
| 81 | + run: | |
| 82 | + $manifest = 'src/PlanViewer.Ssms/source.extension.vsixmanifest' |
| 83 | + $manifestVersion = ([xml](Get-Content $manifest)).PackageManifest.Metadata.Identity.Version |
| 84 | + if ($manifestVersion -ne $env:VERSION) { |
| 85 | + Write-Host "::warning::VSIX manifest version ($manifestVersion) != release version ($env:VERSION) — bump source.extension.vsixmanifest and Properties/AssemblyInfo.cs" |
| 86 | + } |
| 87 | +
|
| 88 | + msbuild src/PlanViewer.Ssms/PlanViewer.Ssms.csproj -t:Restore,Build -p:Configuration=Release -p:DeployExtension=false |
| 89 | + dotnet build src/PlanViewer.Ssms.Installer/PlanViewer.Ssms.Installer.csproj -c Release |
| 90 | +
|
| 91 | + $vsix = 'src/PlanViewer.Ssms/bin/Release/PlanViewer.Ssms.vsix' |
| 92 | + $exe = 'src/PlanViewer.Ssms.Installer/bin/Release/net472/InstallSsmsExtension.exe' |
| 93 | + if (-not (Test-Path $vsix)) { throw "VSIX not produced at $vsix" } |
| 94 | + if (-not (Test-Path $exe)) { throw "Installer not produced at $exe" } |
| 95 | +
|
| 96 | + New-Item -ItemType Directory -Force -Path releases | Out-Null |
| 97 | + Copy-Item $vsix 'releases/PlanViewer.Ssms.vsix' |
| 98 | + Copy-Item $exe 'releases/InstallSsmsExtension.exe' |
| 99 | +
|
| 100 | + - name: Upload SSMS extension to release |
| 101 | + if: steps.ssms.outcome == 'success' |
| 102 | + shell: pwsh |
| 103 | + env: |
| 104 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 105 | + VERSION: ${{ steps.version.outputs.VERSION }} |
| 106 | + run: gh release upload "v$env:VERSION" releases/PlanViewer.Ssms.vsix releases/InstallSsmsExtension.exe --clobber |
| 107 | + |
| 108 | + - name: Warn if SSMS extension build failed |
| 109 | + if: steps.ssms.outcome != 'success' |
| 110 | + run: echo "::warning::SSMS extension VSIX build failed — release published without it (issue #343)" |
| 111 | + |
66 | 112 | # ── SignPath code signing (Windows only, skipped if secret not configured) ── |
67 | 113 | - name: Check if signing is configured |
68 | 114 | id: signing |
|
0 commit comments