From 9ac4ffdc34c724fd8311decf2824443e43f74b5c Mon Sep 17 00:00:00 2001 From: achiez Date: Fri, 13 Mar 2026 00:17:45 +0200 Subject: [PATCH] feat(update): introduce modern update system with JSON changelog, reminders and checksum validation - Replace legacy AutoUpdater dialog with a custom update UI integrated into the application theme - Add support for JSON-based changelog with HTML fallback for backward compatibility - Implement "Remind later" and "Skip version" options to reduce intrusive update prompts - Add visual update indicator and manual "Check for updates" action in the links menu - Persist user update preferences (skipped versions and reminder delays) - Introduce checksum validation (SHA256) for downloaded update packages - Migrate changelog source format from HTML to JSON - Automatically generate HTML changelog and GitHub release notes from JSON via CI - Consolidate release automation into a single GitHub Actions workflow - Remove obsolete legacy update dialog and related code - Expand localization coverage for update-related UI --- .github/workflows/build-release.yml | 78 ------ .github/workflows/prepare-release.yml | 65 ----- .github/workflows/publish.yml | 218 +++++++++++++++ src/NebulaAuth/Core/DialogsController.cs | 13 + src/NebulaAuth/Core/UpdateManager.cs | 165 +++++++---- src/NebulaAuth/MainWindow.xaml | 34 ++- src/NebulaAuth/MainWindow.xaml.cs | 55 +++- src/NebulaAuth/Model/Update/ChangelogEntry.cs | 28 ++ src/NebulaAuth/Model/Update/UpdateSettings.cs | 59 ++++ src/NebulaAuth/View/Dialogs/UpdateDialog.xaml | 172 ++++++++++++ .../View/Dialogs/UpdateDialog.xaml.cs | 9 + src/NebulaAuth/View/LinksView.xaml | 11 +- src/NebulaAuth/View/LinksView.xaml.cs | 10 +- src/NebulaAuth/View/UpdaterView.xaml | 55 ---- src/NebulaAuth/View/UpdaterView.xaml.cs | 9 - src/NebulaAuth/ViewModel/MainVM.cs | 2 +- .../ViewModel/Other/UpdateDialogVM.cs | 73 +++++ src/NebulaAuth/ViewModel/Other/UpdaterVM.cs | 14 - src/NebulaAuth/localization.loc.json | 260 +++++++++--------- 19 files changed, 899 insertions(+), 431 deletions(-) delete mode 100644 .github/workflows/build-release.yml delete mode 100644 .github/workflows/prepare-release.yml create mode 100644 .github/workflows/publish.yml create mode 100644 src/NebulaAuth/Model/Update/ChangelogEntry.cs create mode 100644 src/NebulaAuth/Model/Update/UpdateSettings.cs create mode 100644 src/NebulaAuth/View/Dialogs/UpdateDialog.xaml create mode 100644 src/NebulaAuth/View/Dialogs/UpdateDialog.xaml.cs delete mode 100644 src/NebulaAuth/View/UpdaterView.xaml delete mode 100644 src/NebulaAuth/View/UpdaterView.xaml.cs create mode 100644 src/NebulaAuth/ViewModel/Other/UpdateDialogVM.cs delete mode 100644 src/NebulaAuth/ViewModel/Other/UpdaterVM.cs diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml deleted file mode 100644 index 2d1c57d..0000000 --- a/.github/workflows/build-release.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: Publish release - -on: - push: - tags: - - '*' - workflow_dispatch: - -jobs: - release: - runs-on: windows-latest - permissions: - contents: write - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Extract version - id: ver - run: echo "version=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT - shell: bash - - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' - - - name: Build NebulaAuth - run: dotnet publish src/NebulaAuth/NebulaAuth.csproj -c Release -o build - - - name: Package release - run: | - cd build - powershell Compress-Archive * "../NebulaAuth.${env:GITHUB_REF_NAME}.zip" - shell: pwsh - - - name: Install pandoc - run: | - choco install pandoc -y - - - name: Convert changelog HTML to Markdown (ul-only) - id: changelog - shell: bash - run: | - version="${{ steps.ver.outputs.version }}" - file="changelog/${version}.html" - echo "Looking for file: $file" - - if [ -f "$file" ]; then - echo "✅ File found, extracting