Skip to content

Merge branch 'fix/alt-screen-scroll-freeze' into main #35

Merge branch 'fix/alt-screen-scroll-freeze' into main

Merge branch 'fix/alt-screen-scroll-freeze' into main #35

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
macos-dmg:
name: Build macOS DMG
# Zig 0.15.2's build runner fails to link libc on macOS 26 / Xcode 26
# (undefined _abort/_free/...). Pin until Zig catches up.
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Show toolchain
run: |
set -euxo pipefail
uname -a
swift --version
xcode-select -p
xcrun --show-sdk-path
test -f Vendor/ghostty/build.zig
- name: Install Zig
run: |
set -euxo pipefail
mkdir -p .tools
case "$(uname -m)" in
arm64) ZIG_ARCH=aarch64 ;;
x86_64) ZIG_ARCH=x86_64 ;;
*) echo "unsupported arch: $(uname -m)"; exit 1 ;;
esac
curl -fL "https://ziglang.org/download/0.15.2/zig-${ZIG_ARCH}-macos-0.15.2.tar.xz" -o .tools/zig.tar.xz
tar -xf .tools/zig.tar.xz -C .tools
echo "${GITHUB_WORKSPACE}/.tools/zig-${ZIG_ARCH}-macos-0.15.2" >> "$GITHUB_PATH"
".tools/zig-${ZIG_ARCH}-macos-0.15.2/zig" version
- name: Build Ghostty VT
working-directory: Vendor/ghostty
run: |
set -euxo pipefail
export SDKROOT="$(xcrun --show-sdk-path)"
zig build \
--global-cache-dir "${GITHUB_WORKSPACE}/.zig-cache-global" \
-Demit-lib-vt=true \
-Demit-xcframework=false \
-Doptimize=ReleaseFast
test -f zig-out/lib/libghostty-vt.a
- name: Architecture guard
run: scripts/check-architecture.sh
- name: Test
run: swift test --no-parallel
- name: Build DMG
env:
VERSION: ${{ github.ref_name }}
BUILD: ${{ github.run_number }}
run: |
VERSION="${VERSION#v}" BUILD="$BUILD" scripts/build-dmg.sh release
- name: Build ZIP
env:
VERSION: ${{ github.ref_name }}
BUILD: ${{ github.run_number }}
run: |
VERSION="${VERSION#v}" BUILD="$BUILD" scripts/build-zip.sh release
- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.dmg
dist/*.zip
draft: false
prerelease: false
generate_release_notes: true
deploy-site:
name: Redeploy download page
needs: macos-dmg
runs-on: ubuntu-latest
steps:
- name: Checkout site repo
uses: actions/checkout@v4
with:
repository: freecodetiger/ProGhostty-release
ref: main
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- name: Fetch latest release info (embed at build time)
run: |
curl -sS -H "Accept: application/vnd.github+json" \
-H "User-Agent: ProGhostty-CI" \
"https://api.github.com/repos/freecodetiger/ProGhostty/releases/latest" \
| jq '{tag_name, assets: [.assets[]? | {name, browser_download_url}]}' \
> public/release.json
echo "Embedded release:" && cat public/release.json
- run: npm run build
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
ssh-keyscan -H "${{ secrets.DEPLOY_HOST }}" >> ~/.ssh/known_hosts
- name: Rsync dist to server
run: |
rsync -az --delete --exclude='*.dmg' \
-e "ssh -i ~/.ssh/deploy_key -o IdentitiesOnly=yes" \
dist/ "root@${{ secrets.DEPLOY_HOST }}:/var/www/proghostty/"