Skip to content

Open source CapCut alternative.

TypeScript

Add GitHub release automation

David Led43c909c3098
diff --git a/.github/workflows/promote-donkey-release.yml b/.github/workflows/promote-donkey-release.yml
new file mode 100644
index 00000000..b073e89d
--- /dev/null
+++ b/.github/workflows/promote-donkey-release.yml
@@ -0,0 +1,173 @@
+name: Release Donkey
+
+on:
+ workflow_dispatch:
+ inputs:
+ version:
+ description: Numeric version to build and release, for example 0.1.0.
+ required: true
+ type: string
+ build:
+ description: Optional CFBundleVersion build number. Defaults to the GitHub Actions run number.
+ required: false
+ default: ""
+ type: string
+ promote_major:
+ description: Move the vMAJOR alias tag to this version.
+ required: true
+ default: true
+ type: boolean
+ promote_minor:
+ description: Move the vMAJOR.MINOR alias tag to this version.
+ required: true
+ default: true
+ type: boolean
+ promote_latest:
+ description: Move the latest alias tag to this version.
+ required: true
+ default: true
+ type: boolean
+
+permissions:
+ contents: write
+
+concurrency:
+ group: release-donkey
+ cancel-in-progress: false
+
+jobs:
+ release:
+ name: Build and release
+ runs-on: macos-latest
+
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ ref: ${{ github.event.repository.default_branch }}
+
+ - name: Configure git
+ run: |
+ git config user.name "github-actions[bot]"
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
+ git checkout -B "${{ github.event.repository.default_branch }}" "origin/${{ github.event.repository.default_branch }}"
+ git branch --set-upstream-to="origin/${{ github.event.repository.default_branch }}" "${{ github.event.repository.default_branch }}"
+
+ - name: Fetch tags
+ run: git fetch --tags --force origin
+
+ - name: Prepare release values
+ id: release
+ run: |
+ version="${{ inputs.version }}"
+ version="${version#v}"
+ if [[ ! "$version" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
+ echo "Version must be numeric SemVer, for example 0.1.0 or v0.1.0." >&2
+ exit 1
+ fi
+
+ build="${{ inputs.build }}"
+ if [[ -z "$build" ]]; then
+ build="${GITHUB_RUN_NUMBER}"
+ fi
+ if [[ ! "$build" =~ ^[0-9]+$ ]]; then
+ echo "Build must be numeric for CFBundleVersion." >&2
+ exit 1
+ fi
+
+ {
+ echo "version=$version"
+ echo "tag=v$version"
+ echo "build=$build"
+ echo "target_sha=$(git rev-parse HEAD)"
+ } >> "$GITHUB_OUTPUT"
+
+ - name: Check Sparkle secrets
+ env:
+ DONKEY_SPARKLE_PUBLIC_ED_KEY: ${{ secrets.DONKEY_SPARKLE_PUBLIC_ED_KEY }}
+ DONKEY_SPARKLE_PRIVATE_ED_KEY: ${{ secrets.DONKEY_SPARKLE_PRIVATE_ED_KEY }}
+ run: |
+ if [[ -z "$DONKEY_SPARKLE_PUBLIC_ED_KEY" ]]; then
+ echo "Missing DONKEY_SPARKLE_PUBLIC_ED_KEY repository secret." >&2
+ exit 1
+ fi
+ if [[ -z "$DONKEY_SPARKLE_PRIVATE_ED_KEY" ]]; then
+ echo "Missing DONKEY_SPARKLE_PRIVATE_ED_KEY repository secret." >&2
+ exit 1
+ fi
+
+ - name: Install packaging dependencies
+ run: |
+ if ! command -v magick >/dev/null 2>&1; then
+ brew install imagemagick
+ fi
+
+ - name: Package Donkey
+ env:
+ DONKEY_APP_VERSION: ${{ steps.release.outputs.version }}
+ DONKEY_APP_BUILD: ${{ steps.release.outputs.build }}
+ DONKEY_SPARKLE_FEED_URL: https://donkeyuse.com/appcast.xml
+ DONKEY_SPARKLE_PUBLIC_ED_KEY: ${{ secrets.DONKEY_SPARKLE_PUBLIC_ED_KEY }}
+ run: ./scripts/package-donkey-app.sh
+
+ - name: Generate checksum
+ run: shasum -a 256 dist/Donkey.dmg > dist/Donkey.dmg.sha256
+
+ - name: Sign update archive
+ id: sparkle
+ env:
+ DONKEY_SPARKLE_PRIVATE_ED_KEY: ${{ secrets.DONKEY_SPARKLE_PRIVATE_ED_KEY }}
+ run: |
+ sign_update="$(find apps/Donkey/.build/artifacts/sparkle/Sparkle/bin -name sign_update -type f | head -n 1)"
+ if [[ -z "$sign_update" ]]; then
+ echo "Sparkle sign_update tool was not found after packaging." >&2
+ exit 1
+ fi
+
+ signature="$(printf '%s' "$DONKEY_SPARKLE_PRIVATE_ED_KEY" | "$sign_update" --ed-key-file - -p dist/Donkey.dmg)"
+ if [[ -z "$signature" ]]; then
+ echo "Sparkle signature was empty." >&2
+ exit 1
+ fi
+ echo "signature=$signature" >> "$GITHUB_OUTPUT"
+
+ - name: Create or update GitHub release
+ env:
+ GH_TOKEN: ${{ github.token }}
+ TAG: ${{ steps.release.outputs.tag }}
+ run: |
+ if gh release view "$TAG" >/dev/null 2>&1; then
+ gh release upload "$TAG" dist/Donkey.dmg dist/Donkey.dmg.sha256 --clobber
+ gh release edit "$TAG" --title "Donkey $TAG"
+ else
+ gh release create "$TAG" dist/Donkey.dmg dist/Donkey.dmg.sha256 \
+ --target "${{ steps.release.outputs.target_sha }}" \
+ --title "Donkey $TAG" \
+ --generate-notes
+ fi
+
+ - name: Promote website, appcast, and aliases
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ args=(
+ --repo "${{ github.repository }}"
+ --version "${{ steps.release.outputs.version }}"
+ --build "${{ steps.release.outputs.build }}"
+ --sparkle-ed-signature "${{ steps.sparkle.outputs.signature }}"
+ --asset-name "Donkey.dmg"
+ --commit
+ )
+
+ if [[ "${{ inputs.promote_major }}" != "true" ]]; then
+ args+=(--no-promote-major)
+ fi
+ if [[ "${{ inputs.promote_minor }}" != "true" ]]; then
+ args+=(--no-promote-minor)
+ fi
+ if [[ "${{ inputs.promote_latest }}" != "true" ]]; then
+ args+=(--no-promote-latest)
+ fi
+
+ python3 scripts/promote-github-release.py "${args[@]}"
diff --git a/.gitignore b/.gitignore
index 5885063b..292cd5b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,8 @@ xcuserdata/
## Build artifacts
/dist/
/apps/Donkey/ultralytics/
+__pycache__/
+*.pyc
## Eval artifacts
/evals/task-intent/model-cache/
diff --git a/docs/guides/install-donkey.md b/docs/guides/install-donkey.md
index d5e40536..3a275924 100644
--- a/docs/guides/install-donkey.md
+++ b/docs/guides/install-donkey.md
@@ -32,7 +32,7 @@ Override the single base URL for local or staging testing:
DONKEY_WEB_BASE_URL="http://localhost:3000" ./scripts/package-donkey-app.sh
```
-For distribution through the site, publish the disk image:
+For local distribution testing, publish the disk image:
```text
dist/Donkey.dmg
@@ -64,12 +64,20 @@ open dist/Donkey.dmg
Donkey uses Sparkle for app updates. Do not add a Donkey-specific update installer or custom replacement flow; Sparkle owns appcast parsing, update validation, download, install, relaunch, and user-facing update UI.
+Production releases are distributed from GitHub Releases. See
+`docs/guides/releasing-donkey.md` for the release runbook. Do not use the
+Supabase Storage `/release` bucket for release binaries or appcast hosting.
+
+The public Sparkle feed lives in `site/public/appcast.xml`, which the site
+serves as `https://donkeyuse.com/appcast.xml`. Appcast enclosure URLs point to
+the numeric GitHub Release asset URL, not a moving `latest` or `-latest` URL.
+
Configure Sparkle when packaging:
```bash
DONKEY_APP_VERSION="0.1.1" \
DONKEY_APP_BUILD="2" \
-DONKEY_SPARKLE_FEED_URL="https://example.com/donkey/appcast.xml" \
+DONKEY_SPARKLE_FEED_URL="https://donkeyuse.com/appcast.xml" \
DONKEY_SPARKLE_PUBLIC_ED_KEY="..." \
./scripts/package-donkey-app.sh
```
diff --git a/docs/guides/releasing-donkey.md b/docs/guides/releasing-donkey.md
new file mode 100644
index 00000000..a57f4721
--- /dev/null
+++ b/docs/guides/releasing-donkey.md
@@ -0,0 +1,101 @@
+# Releasing Donkey
+
+Donkey production releases are distributed through GitHub Releases. The
+Supabase Storage `/release` bucket is not part of the release path.
+
+The release entrypoint is the `Release Donkey` GitHub Actions workflow. A
+maintainer chooses a new numeric version in the GitHub UI, and the workflow
+builds the latest default-branch code into the release artifact.
+
+## Release Boundaries
+
+- Release tags use numeric SemVer in `vMAJOR.MINOR.PATCH` form, such as
+ `v0.1.1`.
+- The GitHub Release asset is `Donkey.dmg`.
+- The workflow also uploads `Donkey.dmg.sha256`.
+- The website download URL points to the promoted numeric release asset, not a
+ moving `latest` or `-latest` URL.
+- The public Sparkle appcast is committed at `site/public/appcast.xml` and
+ served as `https://donkeyuse.com/appcast.xml`.
+- Sparkle signs and validates update archives; do not add a Donkey-specific
+ updater or replacement installer.
+
+## One-Time Sparkle Setup
+
+Generate one Sparkle EdDSA signing keypair on a trusted Mac:
+
+```bash
+apps/Donkey/.build/artifacts/sparkle/Sparkle/bin/generate_keys --account donkey
+```
+
+Copy the printed `SUPublicEDKey` value into the GitHub repository secret:
+
+```text
+DONKEY_SPARKLE_PUBLIC_ED_KEY
+```
+
+Export the matching private key:
+
+```bash
+apps/Donkey/.build/artifacts/sparkle/Sparkle/bin/generate_keys \
+ --account donkey \
+ -x /tmp/donkey-sparkle-private-key.txt
+```
+
+Copy the file contents into this GitHub repository secret:
+
+```text
+DONKEY_SPARKLE_PRIVATE_ED_KEY
+```
+
+Delete the exported private key file after adding the secret:
+
+```bash
+rm -f /tmp/donkey-sparkle-private-key.txt
+```
+
+Keep this keypair stable. Already-installed apps trust the public key embedded
+at packaging time and reject future updates signed by a different private key.
+
+## Publishing A Release
+
+1. Open GitHub Actions for the repository.
+2. Select `Release Donkey`.
+3. Click `Run workflow`.
+4. Enter the new numeric version, such as `0.1.1`.
+5. Leave `build` blank unless a specific `CFBundleVersion` is required.
+6. Keep major, minor, and latest promotion enabled for normal releases.
+7. Run the workflow.
+
+The workflow checks out the latest default branch, validates the version, builds
+the macOS app, packages `dist/Donkey.dmg`, signs the DMG with the Sparkle
+private key, creates or updates the numeric GitHub Release, uploads the DMG and
+checksum, updates `site/public/appcast.xml`, updates the website download
+constant, commits those site/appcast changes, marks the numeric release as
+GitHub's latest release, and moves the optional alias tags.
+
+## Alias Tags
+
+The workflow can move these alias tags to the released commit:
+
+- `vMAJOR`
+- `vMAJOR.MINOR`
+- `latest`
+
+These aliases are for maintainer convenience. User-facing website and appcast
+links must keep using the immutable numeric tag.
+
+## Verification
+
+After the workflow finishes:
+
+- The GitHub Release for `vMAJOR.MINOR.PATCH` contains `Donkey.dmg` and
+ `Donkey.dmg.sha256`.
+- The website source has `DONKEY_LATEST_VERSION` set to the numeric version.
+- `site/public/appcast.xml` contains one item for that version and an enclosure
+ URL under `/releases/download/vMAJOR.MINOR.PATCH/Donkey.dmg`.
+- `https://donkeyuse.com/appcast.xml` updates after the site deploy completes.
+
+If Sparkle cannot validate an update, first check that the app was packaged with
+the same `DONKEY_SPARKLE_PUBLIC_ED_KEY` that matches the private key stored in
+GitHub Actions.
diff --git a/scripts/promote-github-release.py b/scripts/promote-github-release.py
new file mode 100644
index 00000000..ed3c8fbf
--- /dev/null
+++ b/scripts/promote-github-release.py
@@ -0,0 +1,248 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+import email.utils
+import json
+import re
+import subprocess
+import sys
+from dataclasses import dataclass
+from datetime import UTC, datetime
+from pathlib import Path
+from typing import Sequence
+from xml.sax.saxutils import escape
+
+
+SEMVER_RE = re.compile(r"^v?(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$")
+LATEST_VERSION_RE = re.compile(r'export const DONKEY_LATEST_VERSION = "[^"]+";')
+
+
+@dataclass(frozen=True)
+class Version:
+ major: int
+ minor: int
+ patch: int
+
+ @property
+ def bare(self) -> str:
+ return f"{self.major}.{self.minor}.{self.patch}"
+
+ @property
+ def tag(self) -> str:
+ return f"v{self.bare}"
+
+ @property
+ def major_tag(self) -> str:
+ return f"v{self.major}"
+
+ @property
+ def minor_tag(self) -> str:
+ return f"v{self.major}.{self.minor}"
+
+
+@dataclass(frozen=True)
+class ReleaseAsset:
+ download_url: str
+ size: int
+
+
+@dataclass(frozen=True)
+class Release:
+ asset: ReleaseAsset
+ html_url: str
+ release_id: int
+ published_at: str
+
+
+def run(command: Sequence[str], *, dry_run: bool = False, mutate: bool = False) -> str:
+ if dry_run and mutate:
+ print(f"dry-run: {' '.join(command)}")
+ return ""
+
+ completed = subprocess.run(command, check=True, text=True, capture_output=True)
+ return completed.stdout.strip()
+
+
+def parse_version(raw_version: str) -> Version:
+ match = SEMVER_RE.match(raw_version.strip())
+ if not match:
+ raise ValueError("version must be numeric SemVer in MAJOR.MINOR.PATCH form, with an optional v prefix")
+
+ return Version(
+ major=int(match.group("major")),
+ minor=int(match.group("minor")),
+ patch=int(match.group("patch")),
+ )
+
+
+def load_release(repo: str, tag: str, asset_name: str) -> Release:
+ payload = run(["gh", "api", f"repos/{repo}/releases/tags/{tag}"])
+ data = json.loads(payload)
+
+ for asset in data.get("assets", []):
+ if asset.get("name") == asset_name:
+ return Release(
+ asset=ReleaseAsset(
+ download_url=str(asset["browser_download_url"]),
+ size=int(asset["size"]),
+ ),
+ html_url=str(data["html_url"]),
+ release_id=int(data["id"]),
+ published_at=str(data.get("published_at") or data.get("created_at") or ""),
+ )
+
+ raise ValueError(f"release {tag} does not have an asset named {asset_name}")
+
+
+def release_pub_date(published_at: str) -> str:
+ if published_at:
+ parsed = datetime.fromisoformat(published_at.replace("Z", "+00:00"))
+ else:
+ parsed = datetime.now(UTC)
+
+ return email.utils.format_datetime(parsed.astimezone(UTC), usegmt=True)
+
+
+def write_release_constants(path: Path, version: Version) -> None:
+ source = path.read_text(encoding="utf-8")
+ replacement = f'export const DONKEY_LATEST_VERSION = "{version.bare}";'
+
+ if LATEST_VERSION_RE.search(source):
+ next_source = LATEST_VERSION_RE.sub(replacement, source, count=1)
+ else:
+ anchor = 'export const GITHUB_REPO_URL = "https://github.com/DonkeyUse-com/Donkey";'
+ next_source = source.replace(anchor, f"{anchor}\n{replacement}", 1)
+
+ path.write_text(next_source, encoding="utf-8")
+
+
+def write_appcast(path: Path, version: Version, build: str, signature: str, release: Release) -> None:
+ appcast = f'''<?xml version="1.0" encoding="utf-8"?>
+<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
+ <channel>
+ <title>Donkey Updates</title>
+ <link>https://donkeyuse.com/appcast.xml</link>
+ <description>Donkey macOS app updates.</description>
+ <language>en</language>
+ <item>
+ <title>Version {escape(version.bare)}</title>
+ <sparkle:releaseNotesLink>{escape(release.html_url)}</sparkle:releaseNotesLink>
+ <pubDate>{release_pub_date(release.published_at)}</pubDate>
+ <enclosure
+ url="{escape(release.asset.download_url)}"
+ sparkle:version="{escape(build)}"
+ sparkle:shortVersionString="{escape(version.bare)}"
+ sparkle:minimumSystemVersion="14.0"
+ sparkle:edSignature="{escape(signature)}"
+ length="{release.asset.size}"
+ type="application/x-apple-diskimage" />
+ </item>
+ </channel>
+</rss>
+'''
+ path.write_text(appcast, encoding="utf-8")
+
+
+def promote_tags(version: Version, promote_major: bool, promote_minor: bool, promote_latest: bool, dry_run: bool) -> None:
+ aliases: list[str] = []
+ if promote_major:
+ aliases.append(version.major_tag)
+ if promote_minor:
+ aliases.append(version.minor_tag)
+ if promote_latest:
+ aliases.append("latest")
+
+ if not aliases:
+ return
+
+ target = run(["git", "rev-list", "-n", "1", version.tag], dry_run=dry_run) if not dry_run else version.tag
+ for alias in aliases:
+ run(["git", "tag", "-f", alias, target], dry_run=dry_run, mutate=True)
+ run(["git", "push", "origin", f"refs/tags/{alias}", "--force"], dry_run=dry_run, mutate=True)
+
+
+def commit_promoted_files(paths: Sequence[Path], version: Version, dry_run: bool) -> None:
+ string_paths = [str(path) for path in paths]
+ if dry_run:
+ print(f"dry-run: git add {' '.join(string_paths)}")
+ print(f"dry-run: git commit -m Promote Donkey {version.tag}")
+ print("dry-run: git push")
+ return
+
+ run(["git", "add", *string_paths])
+ diff = subprocess.run(["git", "diff", "--cached", "--quiet"])
+ if diff.returncode == 0:
+ print("No website or appcast changes to commit.")
+ return
+ if diff.returncode != 1:
+ diff.check_returncode()
+
+ run(["git", "commit", "-m", f"Promote Donkey {version.tag}"])
+ run(["git", "push"])
+
+
+def mark_release_latest(repo: str, release: Release, dry_run: bool) -> None:
+ run(
+ [
+ "gh",
+ "api",
+ "-X",
+ "PATCH",
+ f"repos/{repo}/releases/{release.release_id}",
+ "-f",
+ "make_latest=true",
+ ],
+ dry_run=dry_run,
+ mutate=True,
+ )
+
+
+def parse_args() -> argparse.Namespace:
+ parser = argparse.ArgumentParser(description="Promote a numeric Donkey GitHub Release for site downloads and Sparkle.")
+ parser.add_argument("--repo", required=True, help="GitHub repository in owner/name form.")
+ parser.add_argument("--version", required=True, help="Numeric release version, for example 0.1.0 or v0.1.0.")
+ parser.add_argument("--build", required=True, help="CFBundleVersion build number used by Sparkle.")
+ parser.add_argument("--sparkle-ed-signature", required=True, help="Sparkle EdDSA signature for the release asset.")
+ parser.add_argument("--asset-name", default="Donkey.dmg", help="Release asset to use for downloads and Sparkle.")
+ parser.add_argument("--release-constants", default="site/src/app/_components/landing/data.ts")
+ parser.add_argument("--appcast", default="site/public/appcast.xml")
+ parser.add_argument("--promote-major", action=argparse.BooleanOptionalAction, default=True)
+ parser.add_argument("--promote-minor", action=argparse.BooleanOptionalAction, default=True)
+ parser.add_argument("--promote-latest", action=argparse.BooleanOptionalAction, default=True)
+ parser.add_argument("--commit", action="store_true", help="Commit and push website/appcast changes before moving aliases.")
+ parser.add_argument("--dry-run", action="store_true")
+ return parser.parse_args()
+
+
+def main() -> int:
+ args = parse_args()
+ version = parse_version(args.version)
+ if version.tag.endswith("-latest"):
+ raise ValueError("promoted website versions must be numeric and must not use a -latest tag")
+
+ release = load_release(args.repo, version.tag, args.asset_name)
+ release_constants = Path(args.release_constants)
+ appcast = Path(args.appcast)
+
+ write_release_constants(release_constants, version)
+ write_appcast(appcast, version, args.build, args.sparkle_ed_signature, release)
+ if args.commit:
+ commit_promoted_files([release_constants, appcast], version, args.dry_run)
+
+ promote_tags(version, args.promote_major, args.promote_minor, args.promote_latest, args.dry_run)
+ if args.promote_latest:
+ mark_release_latest(args.repo, release, args.dry_run)
+
+ print(f"Promoted {version.tag}")
+ print(f"Download URL: {release.asset.download_url}")
+ print("Website release URL uses the numeric tag, not a moving alias.")
+ return 0
+
+
+if __name__ == "__main__":
+ try:
+ raise SystemExit(main())
+ except (subprocess.CalledProcessError, ValueError, KeyError, json.JSONDecodeError) as exc:
+ print(f"promote-github-release: {exc}", file=sys.stderr)
+ raise SystemExit(1)
diff --git a/site/public/appcast.xml b/site/public/appcast.xml
new file mode 100644
index 00000000..5c9c11d8
--- /dev/null
+++ b/site/public/appcast.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
+ <channel>
+ <title>Donkey Updates</title>
+ <link>https://donkeyuse.com/appcast.xml</link>
+ <description>Donkey macOS app updates.</description>
+ <language>en</language>
+ </channel>
+</rss>
diff --git a/site/src/app/_components/landing/FinalCTA.tsx b/site/src/app/_components/landing/FinalCTA.tsx
index 767e73fb..ec35123a 100644
--- a/site/src/app/_components/landing/FinalCTA.tsx
+++ b/site/src/app/_components/landing/FinalCTA.tsx
@@ -3,6 +3,7 @@
import { ArrowRight } from "lucide-react";
import { PillButton } from "@/app/_components/landing/LandingPrimitives";
+import { DONKEY_DOWNLOAD_URL } from "@/app/_components/landing/data";
import { useMediaQuery } from "@/app/_components/landing/useMediaQuery";
import { BLACK, CORAL } from "@/app/_components/landing/theme";
@@ -98,7 +99,7 @@ export function FinalCTA() {
justifyContent: "center",
}}
>
- <PillButton href="/install" variant="primary" size="lg">
+ <PillButton href={DONKEY_DOWNLOAD_URL} variant="primary" size="lg">
Download for Mac <ArrowRight size={18} />
</PillButton>
<PillButton href="/pricing" variant="secondary" size="lg">
diff --git a/site/src/app/_components/landing/Hero.tsx b/site/src/app/_components/landing/Hero.tsx
index afc27dd1..175b4b9b 100644
--- a/site/src/app/_components/landing/Hero.tsx
+++ b/site/src/app/_components/landing/Hero.tsx
@@ -3,6 +3,7 @@
import { ArrowRight } from "lucide-react";
import { PillButton, SectionLabel } from "@/app/_components/landing/LandingPrimitives";
+import { DONKEY_DOWNLOAD_URL } from "@/app/_components/landing/data";
import { useMediaQuery } from "@/app/_components/landing/useMediaQuery";
export function Hero() {
@@ -45,7 +46,7 @@ export function Hero() {
you.
</p>
<div style={{ marginTop: 36, display: "flex", flexWrap: "wrap", gap: 12 }}>
- <PillButton href="/install" variant="primary" size="lg">
+ <PillButton href={DONKEY_DOWNLOAD_URL} variant="primary" size="lg">
Download for Mac <ArrowRight size={18} />
</PillButton>
</div>
diff --git a/site/src/app/_components/landing/TopNav.tsx b/site/src/app/_components/landing/TopNav.tsx
index b25615df..99e1664e 100644
--- a/site/src/app/_components/landing/TopNav.tsx
+++ b/site/src/app/_components/landing/TopNav.tsx
@@ -4,6 +4,7 @@ import Image from "next/image";
import { ArrowRight } from "lucide-react";
import { PillButton } from "@/app/_components/landing/LandingPrimitives";
+import { DONKEY_DOWNLOAD_URL } from "@/app/_components/landing/data";
import { useMediaQuery } from "@/app/_components/landing/useMediaQuery";
import { BLACK } from "@/app/_components/landing/theme";
@@ -14,7 +15,7 @@ type Props = {
};
export function TopNav({
- ctaHref = "/install",
+ ctaHref = DONKEY_DOWNLOAD_URL,
ctaLabel = "Download",
homeHref = "/",
}: Props) {
diff --git a/site/src/app/_components/landing/data.ts b/site/src/app/_components/landing/data.ts
index 8bf0dec1..0f31ee79 100644
--- a/site/src/app/_components/landing/data.ts
+++ b/site/src/app/_components/landing/data.ts
@@ -1,6 +1,9 @@
import type { CardColor } from "@/app/_components/landing/theme";
export const GITHUB_REPO_URL = "https://github.com/DonkeyUse-com/Donkey";
+export const DONKEY_LATEST_VERSION = "0.1.0";
+export const DONKEY_LATEST_RELEASE_TAG = `v${DONKEY_LATEST_VERSION}`;
+export const DONKEY_DOWNLOAD_URL = `${GITHUB_REPO_URL}/releases/download/${DONKEY_LATEST_RELEASE_TAG}/Donkey.dmg`;
export const solutionCards = [
{
diff --git a/site/src/app/install/_components/InstallInstructions.tsx b/site/src/app/install/_components/InstallInstructions.tsx
index 7c4fc37c..5ece695c 100644
--- a/site/src/app/install/_components/InstallInstructions.tsx
+++ b/site/src/app/install/_components/InstallInstructions.tsx
@@ -7,7 +7,7 @@ import {
PillButton,
SectionLabel,
} from "@/app/_components/landing/LandingPrimitives";
-import { GITHUB_REPO_URL } from "@/app/_components/landing/data";
+import { DONKEY_DOWNLOAD_URL } from "@/app/_components/landing/data";
import { BG, BLACK } from "@/app/_components/landing/theme";
type InstallStep = {
@@ -82,7 +82,7 @@ export function InstallInstructions() {
drag the app into Applications, then launch it like any other Mac
app.
</p>
- <PillButton href={GITHUB_REPO_URL} variant="primary" size="lg">
+ <PillButton href={DONKEY_DOWNLOAD_URL} variant="primary" size="lg">
Download for Mac <ArrowRight size={18} />
</PillButton>
</div>
@@ -110,9 +110,9 @@ export function InstallInstructions() {
maxWidth: 980,
}}
>
- The desktop app should have downloaded automatically. If not, you can{" "}
+ The desktop app is distributed through GitHub Releases. You can{" "}
<a
- href={GITHUB_REPO_URL}
+ href={DONKEY_DOWNLOAD_URL}
style={{
color: "#cfcac2",
textDecoration: "underline",
@@ -120,7 +120,7 @@ export function InstallInstructions() {
textUnderlineOffset: 5,
}}
>
- download manually
+ download the latest version
</a>
.
</p>
diff --git a/site/src/app/install/page.tsx b/site/src/app/install/page.tsx
index 8ea62194..5f591fb3 100644
--- a/site/src/app/install/page.tsx
+++ b/site/src/app/install/page.tsx
@@ -2,7 +2,7 @@ import type { Metadata } from "next";
import { Footer } from "@/app/_components/landing/Footer";
import { TopNav } from "@/app/_components/landing/TopNav";
-import { GITHUB_REPO_URL } from "@/app/_components/landing/data";
+import { DONKEY_DOWNLOAD_URL } from "@/app/_components/landing/data";
import { BG, BLACK } from "@/app/_components/landing/theme";
import { InstallInstructions } from "@/app/install/_components/InstallInstructions";
@@ -24,7 +24,7 @@ export default function InstallPage() {
WebkitFontSmoothing: "antialiased",
}}
>
- <TopNav ctaHref={GITHUB_REPO_URL} ctaLabel="Download" />
+ <TopNav ctaHref={DONKEY_DOWNLOAD_URL} ctaLabel="Download" />
<InstallInstructions />
<Footer />
</main>