diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 35bd6d44..a5195d88 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: permissions: contents: write + pull-requests: write jobs: release: @@ -47,8 +48,10 @@ jobs: } Set-Content -Path "src/Solution Items/usedComponents.json" -Value $output -Encoding UTF8 - - name: Commit generated files to Development + - name: Open PR with generated files shell: pwsh + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" @@ -59,20 +62,42 @@ jobs: Copy-Item "src/Solution Items/usedComponents.json" $tempComponents Copy-Item "src/PluginRegistry/PluginHashGenerator.Generated.cs" $tempHashes - # Switch to Development and apply both updates + # Development is PR-protected, so apply the updates on a fresh branch off Development git fetch origin Development - git checkout Development + $branch = "chore/generated-files-${{ github.ref_name }}" + git checkout -B $branch origin/Development + Copy-Item $tempComponents "src/Solution Items/usedComponents.json" Copy-Item $tempHashes "src/PluginRegistry/PluginHashGenerator.Generated.cs" git add "src/Solution Items/usedComponents.json" git add "src/PluginRegistry/PluginHashGenerator.Generated.cs" + git diff --staged --quiet - if ($LASTEXITCODE -ne 0) { - git commit -m "chore: update plugin hashes and usedComponents.json for ${{ github.ref_name }} [skip ci]" - git push origin Development + if ($LASTEXITCODE -eq 0) { + Write-Host "No changes to commit; skipping PR." + exit 0 + } + + git commit -m "chore: update plugin hashes and usedComponents.json for ${{ github.ref_name }} [skip ci]" + # Force-push so re-running the release for the same tag updates the existing branch + git push --force origin $branch + + # Create the PR if one does not already exist for this branch + $existing = gh pr list --head $branch --base Development --state open --json number --jq '.[0].number' + if ([string]::IsNullOrWhiteSpace($existing)) { + gh pr create --base Development --head $branch ` + --title "chore: update generated files for ${{ github.ref_name }} [skip ci]" ` + --body "Automated update of plugin hashes and ``usedComponents.json`` for release ${{ github.ref_name }}." } else { - Write-Host "No changes to commit" + Write-Host "PR #$existing already exists for $branch" + } + + # Best-effort auto-merge. Will complete once branch rules are satisfied; + # if the ruleset requires a manual review, merge the PR by hand. + gh pr merge $branch --auto --squash --delete-branch 2>&1 | Write-Host + if ($LASTEXITCODE -ne 0) { + Write-Host "::warning::Could not enable auto-merge for $branch; merge the PR manually." } - name: Create GitHub Release diff --git a/src/PluginRegistry/PluginHashGenerator.Generated.cs b/src/PluginRegistry/PluginHashGenerator.Generated.cs index 57823e8f..be4694d6 100644 --- a/src/PluginRegistry/PluginHashGenerator.Generated.cs +++ b/src/PluginRegistry/PluginHashGenerator.Generated.cs @@ -10,7 +10,7 @@ public static partial class PluginValidator { /// /// Gets pre-calculated SHA256 hashes for built-in plugins. - /// Generated: 2026-06-08 18:22:43 UTC + /// Generated: 2026-06-09 06:55:04 UTC /// Configuration: Release /// Plugin count: 21 /// @@ -18,27 +18,27 @@ public static Dictionary GetBuiltInPluginHashes() { return new Dictionary(StringComparer.OrdinalIgnoreCase) { - ["AutoColumnizer.dll"] = "FF45688846E19EDDF7244BD9D69254926E32DD5A79730018160696C9F9B5B735", + ["AutoColumnizer.dll"] = "3D6748C5E935505FFBFE24830208B11FAACF4EDCD672FBEABA4DD239B05D927A", ["BouncyCastle.Cryptography.dll"] = "E5EEAF6D263C493619982FD3638E6135077311D08C961E1FE128F9107D29EBC6", ["BouncyCastle.Cryptography.dll (x86)"] = "E5EEAF6D263C493619982FD3638E6135077311D08C961E1FE128F9107D29EBC6", - ["CsvColumnizer.dll"] = "3865D9280E673C03185B2B39053708DD6D782D97C5292AF4DD123AFA19531CD3", - ["CsvColumnizer.dll (x86)"] = "3865D9280E673C03185B2B39053708DD6D782D97C5292AF4DD123AFA19531CD3", - ["DefaultPlugins.dll"] = "36C050D6380D6F7B9403D43AACFA060F542D225E8C6B027B2E4F3CB18C5E298B", - ["FlashIconHighlighter.dll"] = "3A02E81476958DA1C411C8A2425A6482A55C05CADDFEAE60E7E4B282EA8CDBDF", - ["GlassfishColumnizer.dll"] = "135C0D23AB6A44376B01AB3FB19A2EADDDEBC6EDFDEDBA6682F30C57D988DC36", - ["JsonColumnizer.dll"] = "6270BE7D27EE4A5AB5AB1D9967ED97F3EC91B553C7D3A5968350933AB892F772", - ["JsonCompactColumnizer.dll"] = "8E5F12FE7BD86DDC9B3B0B1D3C04B49AD0394C81A9F899684A5F16532A5B0A35", - ["Log4jXmlColumnizer.dll"] = "3C4806DBD51DA3CECF152EB19C0A267DC0F8B977DF9457DAEEFA1F0A099525ED", - ["LogExpert.Resources.dll"] = "2D1743296A62E8BB1089635043A46A036AAD45E92E981C77ECA3373E3D9CCB5B", + ["CsvColumnizer.dll"] = "D5435B1886C4FA665A59FB647CE488C092CD2BF0587BB219B3A623C656BA8BF6", + ["CsvColumnizer.dll (x86)"] = "D5435B1886C4FA665A59FB647CE488C092CD2BF0587BB219B3A623C656BA8BF6", + ["DefaultPlugins.dll"] = "675EACAA0B1700FC6163ED29058124553DF9D6E935020CF04B38DAA9F33C279C", + ["FlashIconHighlighter.dll"] = "47605D179B3646F81BF44E8626251CDD30752C0535293AF4C4AA89A1CAF76B06", + ["GlassfishColumnizer.dll"] = "1C30B9D350C46B33A76C96C88DA4B9DCF2B1474BB1ACD92461878365F704A2EC", + ["JsonColumnizer.dll"] = "27F5ED050CEDBC1BD72250DD7C9FC330DB32825FE04FB9C899376BF45F347D92", + ["JsonCompactColumnizer.dll"] = "08F189DE85381709A10DD506DA2DC1F4D9885C68AD0A63799557166295CAD590", + ["Log4jXmlColumnizer.dll"] = "D21498D4B727AA8F2DAF59CD470AEEB11603FF64936E8AB11EDD92A1370BC681", + ["LogExpert.Resources.dll"] = "C8390BB994FACB178D34EC2023F8862F685489549F52726FD9E742B6497B7781", ["Microsoft.Extensions.DependencyInjection.Abstractions.dll"] = "67FA4325000DB017DC0C35829B416F024F042D24EFB868BCF17A895EE6500A93", ["Microsoft.Extensions.DependencyInjection.Abstractions.dll (x86)"] = "67FA4325000DB017DC0C35829B416F024F042D24EFB868BCF17A895EE6500A93", ["Microsoft.Extensions.Logging.Abstractions.dll"] = "BB853130F5AFAF335BE7858D661F8212EC653835100F5A4E3AA2C66A4D4F685D", ["Microsoft.Extensions.Logging.Abstractions.dll (x86)"] = "BB853130F5AFAF335BE7858D661F8212EC653835100F5A4E3AA2C66A4D4F685D", - ["RegexColumnizer.dll"] = "082BF04B54570B54F4BCF323338174F5818ED1A0992F56E6D7B367D36BAD2D57", - ["SftpFileSystem.dll"] = "5E8378F4FB45D51A635B471F743326F40199AB70FBDB8D2527F8D0A00C33AC78", - ["SftpFileSystem.dll (x86)"] = "9F2C46E0C878EE92BBA225A859872A7BE3E9F6584931DE45FC087192945D41F4", - ["SftpFileSystem.Resources.dll"] = "394C36CE8D4CFD7735E200FEF7ADC6C0F133AD94221B72AE7977600ABB25AA4B", - ["SftpFileSystem.Resources.dll (x86)"] = "394C36CE8D4CFD7735E200FEF7ADC6C0F133AD94221B72AE7977600ABB25AA4B", + ["RegexColumnizer.dll"] = "76A856BE58511F40B5E89D7F100AA7843AC62CD380717F924CCFDC234375BDAD", + ["SftpFileSystem.dll"] = "73D71AF4831468722C327DE246879343B9F95E4BA931B07F03A4B60C70B4A2A2", + ["SftpFileSystem.dll (x86)"] = "107BD9DF13EB1C0FB7F8B4C1B0D77B79A62A804FEA5F656FFADEBCDE3FFD4E5B", + ["SftpFileSystem.Resources.dll"] = "12539CBB43138C4D1AF4FFFC0D2D6370B6969E358DF9A03FD29720CA18D34287", + ["SftpFileSystem.Resources.dll (x86)"] = "12539CBB43138C4D1AF4FFFC0D2D6370B6969E358DF9A03FD29720CA18D34287", }; }