Skip to content
Draft
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
177 changes: 0 additions & 177 deletions .github/copilot-instructions.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ updates:
- "System.*"
Silk:
patterns:
- "Silk.NET.*"
- "Silk.NET.*"
29 changes: 9 additions & 20 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
build:
name: Build, Test & Release
runs-on: windows-latest
timeout-minutes: 20
timeout-minutes: 15
permissions:
contents: write # For creating releases and committing metadata
packages: write # For publishing packages
Expand All @@ -35,7 +35,6 @@ jobs:
version: ${{ steps.pipeline.outputs.version }}
release_hash: ${{ steps.pipeline.outputs.release_hash }}
should_release: ${{ steps.pipeline.outputs.should_release }}
skipped_release: ${{ steps.pipeline.outputs.skipped_release }}

steps:
- name: Set up JDK 17
Expand All @@ -60,11 +59,6 @@ jobs:
cache: true
cache-dependency-path: "**/*.csproj"

- name: Install dotnet-coverage
shell: pwsh
run: |
dotnet tool install --global dotnet-coverage

- name: Cache SonarQube Cloud packages
if: ${{ env.SONAR_TOKEN != '' }}
uses: actions/cache@v4
Expand All @@ -90,7 +84,7 @@ jobs:
if: ${{ env.SONAR_TOKEN != '' && steps.cache-sonar-scanner.outputs.cache-hit != 'true' }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: pwsh
shell: powershell
run: |
New-Item -Path .\.sonar\scanner -ItemType Directory
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
Expand All @@ -99,9 +93,9 @@ jobs:
if: ${{ env.SONAR_TOKEN != '' }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: pwsh
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"${{ github.repository_owner }}_${{ github.event.repository.name }}" /o:"${{ github.repository_owner }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.coverage.exclusions="**/*Tests/**/*,**/*Test/**/*,**/obj/**/*,**/*.dll" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
.\.sonar\scanner\dotnet-sonarscanner begin /k:"${{ github.repository_owner }}_${{ github.event.repository.name }}" /o:"${{ github.repository_owner }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="coverage/coverage.opencover.xml" /d:sonar.coverage.exclusions="**/*Test*.cs,**/*.Tests.cs,**/*.Tests/**/*,**/obj/**/*,**/*.dll" /d:sonar.cs.vstest.reportsPaths="coverage/TestResults/**/*.trx" /d:sonar.verbose=true

- name: Run PSBuild Pipeline
id: pipeline
Expand All @@ -121,7 +115,6 @@ jobs:
-GitHubRepo "${{ github.repository }}" `
-GithubToken "${{ github.token }}" `
-NuGetApiKey "${{ secrets.NUGET_KEY }}" `
-KtsuPackageKey "${{ secrets.KTSU_PACKAGE_KEY }}" `
-WorkspacePath "${{ github.workspace }}" `
-ExpectedOwner "ktsu-dev" `
-ChangelogFile "CHANGELOG.md" `
Expand All @@ -147,21 +140,17 @@ jobs:
"release_hash=$($buildConfig.Data.ReleaseHash)" >> $env:GITHUB_OUTPUT
"should_release=$($buildConfig.Data.ShouldRelease)" >> $env:GITHUB_OUTPUT

if ($buildConfig.Data.SkippedRelease) {
"skipped_release=true" >> $env:GITHUB_OUTPUT
}

- name: End SonarQube
if: env.SONAR_TOKEN != '' && steps.pipeline.outputs.skipped_release != 'true'
if: ${{ env.SONAR_TOKEN != '' }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: pwsh
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"

- name: Upload Coverage Report
uses: actions/upload-artifact@v4
if: always() && steps.pipeline.outputs.skipped_release != 'true'
if: always()
with:
name: coverage-report
path: |
Expand All @@ -171,7 +160,7 @@ jobs:
winget:
name: Update Winget Manifests
needs: build
if: needs.build.outputs.should_release == 'true' && needs.build.outputs.skipped_release != 'true'
if: needs.build.outputs.should_release == 'true'
runs-on: windows-latest
timeout-minutes: 10
permissions:
Expand Down Expand Up @@ -208,7 +197,7 @@ jobs:
security:
name: Security Scanning
needs: build
if: needs.build.outputs.should_release == 'true' && needs.build.outputs.skipped_release != 'true'
if: needs.build.outputs.should_release == 'true'
runs-on: windows-latest
timeout-minutes: 10
permissions:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/update-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
# Function to get latest version from NuGet
function Get-LatestNuGetVersion {
param([string]$PackageId)

try {
Write-Host "Checking NuGet for package: $PackageId"
# NuGet API requires lowercase package names
Expand All @@ -84,11 +84,11 @@ jobs:
[string]$SdkName,
[string]$NewVersion
)

$content = Get-Content $FilePath -Raw
$pattern = "Sdk=`"$SdkName/[\d\.]+"
$replacement = "Sdk=`"$SdkName/$NewVersion"

if ($content -match $pattern) {
$newContent = $content -replace $pattern, $replacement
if ($content -ne $newContent) {
Expand All @@ -107,11 +107,11 @@ jobs:
[string]$SdkName,
[string]$NewVersion
)

try {
$json = Get-Content $FilePath -Raw | ConvertFrom-Json
$updated = $false

# Check if msbuild-sdks section exists
if ($json.PSObject.Properties.Name -contains "msbuild-sdks") {
if ($json."msbuild-sdks".PSObject.Properties.Name -contains $SdkName) {
Expand All @@ -122,7 +122,7 @@ jobs:
}
}
}

if ($updated) {
$json | ConvertTo-Json -Depth 10 | Set-Content -Path $FilePath -NoNewline
Write-Host "Updated $FilePath : $SdkName -> $NewVersion"
Expand All @@ -147,7 +147,7 @@ jobs:
if ($content -match 'Sdk="(ktsu\.Sdk\.\w+)/([\d\.]+)"') {
$sdkName = $matches[1]
$currentVersion = $matches[2]

if (-not $sdkVersions.ContainsKey($sdkName)) {
$sdkVersions[$sdkName] = $currentVersion
}
Expand All @@ -162,7 +162,7 @@ jobs:
foreach ($property in $json."msbuild-sdks".PSObject.Properties) {
$sdkName = $property.Name
$currentVersion = $property.Value

# Only track ktsu SDKs
if ($sdkName -like "ktsu.Sdk.*") {
if (-not $sdkVersions.ContainsKey($sdkName)) {
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
foreach ($sdk in $sdkVersions.Keys) {
Write-Host "Checking for updates to $sdk..."
$latestVersion = Get-LatestNuGetVersion -PackageId $sdk

if ($latestVersion -and $latestVersion -ne $sdkVersions[$sdk]) {
$updates[$sdk] = $latestVersion
Write-Host " Update available: $($sdkVersions[$sdk]) -> $latestVersion"
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:

if ($hasUpdates) {
"has_updates=true" >> $env:GITHUB_OUTPUT

# Create summary of changes
$summary = "SDK Updates:`n"
foreach ($sdk in $updates.Keys) {
Expand Down Expand Up @@ -313,4 +313,4 @@ jobs:
Write-Host "## ℹ️ No SDK Updates Available" >> $env:GITHUB_STEP_SUMMARY
Write-Host "" >> $env:GITHUB_STEP_SUMMARY
Write-Host "All ktsu SDKs are already up to date." >> $env:GITHUB_STEP_SUMMARY
}
}
Loading
Loading