Просмотр исходного кода

feat(installer): unversioned alias on stable/beta tag releases

  Adds bambuddy-windows-x64-setup.exe (unversioned) alongside the
  date-stamped bambuddy-<version>-windows-x64-setup.exe for stable
  and beta tag releases. Lets external surfaces (website, wiki,
  newsletters) link to a stable URL that survives version bumps:

    https://github.com/maziggy/bambuddy/releases/latest/download/
      bambuddy-windows-x64-setup.exe

  Daily prereleases are excluded — GitHub's `latest` redirect skips
  prereleases so the alias would add no value there, and an
  unversioned name next to a date-stamped versioned one on a daily
  release page is semantically confusing.
maziggy 2 месяцев назад
Родитель
Сommit
7bb11df268
1 измененных файлов с 23 добавлено и 0 удалено
  1. 23 0
      .github/workflows/windows-installer.yml

+ 23 - 0
.github/workflows/windows-installer.yml

@@ -57,6 +57,29 @@ jobs:
           & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" bambuddy.iss
         shell: pwsh
 
+      # Stable + beta tag releases (e.g. v0.2.5b1, v0.3.0) get an unversioned
+      # copy alongside the versioned filename so external surfaces (website,
+      # wiki, newsletters) can link to a stable URL that survives version
+      # bumps:
+      #
+      #   https://github.com/maziggy/bambuddy/releases/latest/download/bambuddy-windows-x64-setup.exe
+      #
+      # GitHub's `latest` redirect excludes prereleases, so this URL always
+      # points at whatever was released as a full release. Daily prereleases
+      # are excluded from the alias because (a) the unversioned name would be
+      # semantically confusing next to the date-stamped versioned name on a
+      # daily prerelease page, and (b) there's no stable "latest daily" URL
+      # anyway (`latest` skips prereleases), so the alias adds no value there.
+      - name: Create unversioned alias (non-daily tags only)
+        if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-daily.')
+        shell: pwsh
+        working-directory: installers/windows/build/output
+        run: |
+          $versioned = Get-ChildItem -Filter "bambuddy-*-windows-x64-setup.exe" | Select-Object -First 1
+          if (-not $versioned) { throw "no versioned installer .exe found" }
+          Copy-Item $versioned.FullName "bambuddy-windows-x64-setup.exe"
+          Write-Host "alias: bambuddy-windows-x64-setup.exe -> $($versioned.Name)"
+
       - name: Upload installer artifact
         uses: actions/upload-artifact@v4
         with: