diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00659308d..38e339627 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1370,13 +1370,27 @@ jobs: # filenames, which do not exist on research releases (research # artifacts carry a -research token). Point at the asset # list instead of linking to 404s. + # + # Download lines come in two forms: a linked bold label + # (` - [**Windows**](url) ...`) or a plain bold label followed by + # per-arch links (` - **macOS**: [Intel](url) | ... `) — both must + # be stripped, on both the Classic and Tauri sections, or the + # plain-label form survives and keeps pointing at nonexistent + # standard-edition filenames. python3 - <<'PY' import re path = "release_notes.md" notes = open(path).read() notes = re.sub( - r"(?m)^ - \[\*\*(Windows|macOS|Linux)\*\*\]\([^)]*\)[^\n]*\n?", + r"(?m)^ - (?:\[\*\*(?:Windows|macOS|Linux)\*\*\]\([^)]*\)|\*\*(?:Windows|macOS|Linux)\*\*:)[^\n]*\n?", + "", + notes, + ) + # Distribution sub-headings (Classic/Tauri) have no content left + # once their download lines are stripped above. + notes = re.sub( + r"(?m)^## (?:Classic|Tauri) distribution[^\n]*\n(?:\n)*", "", notes, ) diff --git a/scripts/build_changelog.py b/scripts/build_changelog.py index d2cda8d55..995253194 100755 --- a/scripts/build_changelog.py +++ b/scripts/build_changelog.py @@ -414,11 +414,22 @@ def build( See the [getting started guide in the documentation](https://docs.activitywatch.net/en/latest/getting-started.html). """.strip() output += "\n\n" + # Tauri auto-updater AppImage assets use version without the 'v' prefix + tag_no_v = tag.lstrip("v") + base = f"https://github.com/ActivityWatch/activitywatch/releases/download/{tag}" output += f"""# Downloads - - [**Windows**](https://github.com/ActivityWatch/activitywatch/releases/download/{tag}/activitywatch-{tag}-windows-x86_64-setup.exe) (.exe, installer) - - [**macOS**](https://github.com/ActivityWatch/activitywatch/releases/download/{tag}/activitywatch-{tag}-macos-x86_64.dmg) (.dmg) - - [**Linux**](https://github.com/ActivityWatch/activitywatch/releases/download/{tag}/activitywatch-{tag}-linux-x86_64.zip) (.zip) +## Classic distribution + + - [**Windows**]({base}/activitywatch-{tag}-windows-x86_64-setup.exe) (.exe installer) + - **macOS**: [Intel]({base}/activitywatch-{tag}-macos-x86_64.dmg) | [Apple Silicon]({base}/activitywatch-{tag}-macos-arm64.dmg) (.dmg) + - **Linux**: [.zip]({base}/activitywatch-{tag}-linux-x86_64.zip) | [.AppImage]({base}/activitywatch-linux-x86_64.AppImage) | [.deb]({base}/activitywatch-{tag}-linux-x86_64.deb) + +## Tauri distribution (experimental — native Wayland support on Linux) + + - [**Windows**]({base}/activitywatch-tauri-{tag}-windows-x86_64-setup.exe) (.exe installer) + - **macOS**: [Intel]({base}/activitywatch-tauri-{tag}-macos-x86_64.dmg) | [Apple Silicon]({base}/activitywatch-tauri-{tag}-macos-arm64.dmg) (.dmg) + - **Linux**: [.AppImage]({base}/activitywatch-tauri-{tag_no_v}-linux-x86_64.AppImage) | [.zip]({base}/activitywatch-tauri-{tag}-linux-x86_64.zip) """.strip() output += "\n\n"