Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci-macos-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ on:
paths:
- '.github/workflows/ci-macos-packaging.yml'
- '.github/workflows/release-macos.yml'
- '.github/workflows/release-finalize.yml'
- 'scripts/macos/**'
push:
branches: [main]
paths:
- '.github/workflows/ci-macos-packaging.yml'
- '.github/workflows/release-macos.yml'
- '.github/workflows/release-finalize.yml'
- 'scripts/macos/**'

permissions:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-portable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ jobs:
run: python3 scripts/docs/validate-manifest.py
- name: Flatpak icon validation
run: python3 scripts/release/test-flatpak-icon.py
- name: Release publication regression tests
run: python3 scripts/release/test-publication.py
- name: Program status acceptance fixture tests
run: python3 -m unittest discover -s scripts/terminal -p 'test_*.py'
- name: Release script syntax checks
Expand Down
365 changes: 180 additions & 185 deletions .github/workflows/release-finalize.yml

Large diffs are not rendered by default.

23 changes: 10 additions & 13 deletions .github/workflows/release-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ jobs:
-print0)

update-appcast:
name: Update Sparkle appcast (linux-x86_64)
name: Prepare signed updater metadata (linux-x86_64)
concurrency:
# Each platform owns a different appcast file. Do not put these jobs
# in one GitHub concurrency group: it has only one pending slot, so a
Expand Down Expand Up @@ -254,7 +254,8 @@ jobs:
run: |
if [[ -z "${SPARKLE_SIGNING_KEY:-}" ]]; then
echo "available=false" >>"$GITHUB_OUTPUT"
echo "::warning::SPARKLE_SIGNING_KEY not set — skipping appcast update"
echo "::error::SPARKLE_SIGNING_KEY not set — cannot prepare signed updater metadata"
exit 1
else
echo "available=true" >>"$GITHUB_OUTPUT"
fi
Expand All @@ -279,7 +280,7 @@ jobs:
git clone --single-branch --branch gh-pages \
"https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git" \
gh-pages 2>/dev/null || {
mkdir -p gh-pages/appcast
mkdir -p "gh-pages/release-staging/$GITHUB_REF_NAME/appcast"
cd gh-pages
git init
git checkout -b gh-pages
Expand Down Expand Up @@ -313,12 +314,12 @@ jobs:
channel="${{ steps.meta.outputs.channel }}"
build_number="${{ github.run_number }}"

mkdir -p gh-pages/appcast
mkdir -p "gh-pages/release-staging/$GITHUB_REF_NAME/appcast"

tarball=$(find release-artifacts -name "*-linux-x86_64.tar.gz" -type f | head -1)
if [[ -z "$tarball" ]]; then
echo "::warning::No Linux tarball found — skipping"
exit 0
echo "::error::No Linux tarball found"
exit 1
fi

sig_output=$(./scripts/sparkle/sign-artifact.sh "$tarball")
Expand All @@ -332,7 +333,7 @@ jobs:
tarball_name=$(basename "$tarball")
download_url="https://github.com/${repo}/releases/download/${tag}/${tarball_name}"

appcast_file="gh-pages/appcast/${channel}-linux-x86_64.xml"
appcast_file="gh-pages/release-staging/${tag}/appcast/${channel}-linux-x86_64.xml"

# Re-use the same appcast generator macOS + Windows use.
# Linux has no OS-minimum equivalent in the Sparkle schema
Expand All @@ -357,19 +358,15 @@ jobs:

echo "Updated appcast: ${channel}-linux-x86_64.xml (build $build_number)"

- name: Push appcast to gh-pages
- name: Stage signed appcasts without notifying clients
if: steps.meta.outputs.channel != 'dev' && steps.sparkle.outputs.available == 'true'
shell: bash
run: |
set -euo pipefail
cd gh-pages
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# Keep install.sh in sync from main repo. The macOS release
# job also copies it, but if a Linux-only tag fires (or the
# macOS job hasn't run yet) we still want the latest script.
cp "${{ github.workspace }}/scripts/install.sh" install.sh
git add appcast/ install.sh
git add "release-staging/$GITHUB_REF_NAME/appcast/"
if git diff --cached --quiet; then
echo "No appcast changes to commit"
exit 0
Expand Down
149 changes: 10 additions & 139 deletions .github/workflows/release-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ jobs:
-print0)

update-appcast:
name: Update Sparkle appcast
name: Prepare signed updater metadata
concurrency:
# Keep macOS retries independent from the other platform jobs. The
# push below rebases against the shared branch when another platform
Expand Down Expand Up @@ -302,7 +302,8 @@ jobs:
run: |
if [[ -z "${SPARKLE_SIGNING_KEY:-}" ]]; then
echo "available=false" >>"$GITHUB_OUTPUT"
echo "::warning::SPARKLE_SIGNING_KEY not set — skipping appcast update"
echo "::error::SPARKLE_SIGNING_KEY not set — cannot prepare signed updater metadata"
exit 1
else
echo "available=true" >>"$GITHUB_OUTPUT"
fi
Expand All @@ -329,7 +330,7 @@ jobs:
git clone --single-branch --branch gh-pages \
"https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git" \
gh-pages 2>/dev/null || {
mkdir -p gh-pages/appcast
mkdir -p "gh-pages/release-staging/$GITHUB_REF_NAME/appcast"
cd gh-pages
git init
git checkout -b gh-pages
Expand All @@ -356,14 +357,14 @@ jobs:
marketing="${{ steps.meta.outputs.marketing }}"
build_number="${{ github.run_number }}"

mkdir -p gh-pages/appcast
mkdir -p "gh-pages/release-staging/$GITHUB_REF_NAME/appcast"

for arch in arm64 x86_64; do
# Find the DMG for this arch
dmg=$(find release-artifacts -name "*-macos-${arch}.dmg" -type f | head -1)
if [[ -z "$dmg" ]]; then
echo "::warning::No DMG found for $arch — skipping"
continue
echo "::error::No DMG found for $arch"
exit 1
fi

# Sign the artifact and extract signature
Expand All @@ -381,7 +382,7 @@ jobs:
download_url="https://github.com/${repo}/releases/download/${tag}/${dmg_name}"

# Update the appcast for this channel+arch
appcast_file="gh-pages/appcast/${channel}-macos-${arch}.xml"
appcast_file="gh-pages/release-staging/${tag}/appcast/${channel}-macos-${arch}.xml"

APPCAST_FILE="$appcast_file" \
APPCAST_TITLE="con" \
Expand All @@ -398,17 +399,15 @@ jobs:
echo "Updated appcast: ${channel}-macos-${arch}.xml (build $build_number)"
done

- name: Push appcast to gh-pages
- name: Stage signed appcasts without notifying clients
if: steps.meta.outputs.channel != 'dev' && steps.sparkle.outputs.available == 'true'
shell: bash
run: |
set -euo pipefail
cd gh-pages
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# Keep install.sh in sync from main repo
cp "${{ github.workspace }}/scripts/install.sh" install.sh
git add appcast/ install.sh
git add "release-staging/$GITHUB_REF_NAME/appcast/"
if git diff --cached --quiet; then
echo "No appcast changes to commit"
exit 0
Expand All @@ -426,131 +425,3 @@ jobs:
fi
sleep $((attempt * 2))
done

update-homebrew:
name: Update Homebrew cask
runs-on: macos-15
needs: publish

steps:
- name: Derive release metadata
id: meta
shell: bash
run: |
set -euo pipefail
version="${GITHUB_REF_NAME#v}"
channel="stable"
if [[ "$version" == *"-beta."* ]]; then
channel="beta"
elif [[ "$version" == *"-dev."* ]]; then
channel="dev"
fi
echo "version=$version" >>"$GITHUB_OUTPUT"
echo "channel=$channel" >>"$GITHUB_OUTPUT"

- name: Download release artifacts
if: steps.meta.outputs.channel != 'dev'
uses: actions/download-artifact@v5
with:
pattern: macos-*
path: release-artifacts

- name: Update cask formula
if: steps.meta.outputs.channel != 'dev'
shell: bash
env:
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
run: |
set -euo pipefail

version="${{ steps.meta.outputs.version }}"
channel="${{ steps.meta.outputs.channel }}"

if [[ -z "${GH_TOKEN:-}" ]]; then
echo "::warning::HOMEBREW_TAP_TOKEN not set — skipping cask update"
exit 0
fi

# Determine cask name
if [[ "$channel" == "beta" ]]; then
cask="con-beta"
app_name="con Beta"
else
cask="con"
app_name="con"
fi

# Compute SHA256 for each arch DMG
arm64_dmg=$(find release-artifacts -name "*-macos-arm64.dmg" -type f | head -1)
x86_64_dmg=$(find release-artifacts -name "*-macos-x86_64.dmg" -type f | head -1)

arm64_sha=""
x86_64_sha=""
[[ -n "$arm64_dmg" ]] && arm64_sha=$(shasum -a 256 "$arm64_dmg" | cut -d' ' -f1)
[[ -n "$x86_64_dmg" ]] && x86_64_sha=$(shasum -a 256 "$x86_64_dmg" | cut -d' ' -f1)

if [[ -z "$arm64_sha" && -z "$x86_64_sha" ]]; then
echo "::warning::No DMGs found — skipping cask update"
exit 0
fi

# Pre-compute values to avoid mixing Ruby/bash syntax in heredoc
dmg_prefix="${app_name// /-}"
if [[ "$channel" == "beta" ]]; then
bundle_suffix=".beta"
else
bundle_suffix=""
fi

# Clone tap and update cask
git clone "https://x-access-token:${GH_TOKEN}@github.com/nowledge-co/homebrew-tap.git" tap
cd tap

cat > "Casks/${cask}.rb" <<EOF
cask "${cask}" do
version "${version}"

on_arm do
sha256 "${arm64_sha}"
url "https://github.com/nowledge-co/con-terminal/releases/download/v#{version}/${dmg_prefix}-#{version}-macos-arm64.dmg"
end

on_intel do
sha256 "${x86_64_sha}"
url "https://github.com/nowledge-co/con-terminal/releases/download/v#{version}/${dmg_prefix}-#{version}-macos-x86_64.dmg"
end

name "${app_name}"
desc "GPU-accelerated terminal emulator with built-in AI agent"
homepage "https://github.com/nowledge-co/con-terminal"

livecheck do
url :url
strategy :github_latest
regex(/v?(\d+(?:\.\d+)*(?:-beta\.\d+)?)/i)
end

auto_updates true
depends_on :macos

app "${app_name}.app"
binary "#{appdir}/${app_name}.app/Contents/MacOS/con-cli", target: "con-cli"

zap trash: [
"~/.config/con",
"~/Library/Caches/co.nowledge.con${bundle_suffix}",
"~/Library/Preferences/co.nowledge.con${bundle_suffix}.plist",
]
end
EOF
sed -i '' 's/^ //' "Casks/${cask}.rb"

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add "Casks/${cask}.rb"
if git diff --cached --quiet; then
echo "No cask changes"
exit 0
fi
git commit -m "Update ${cask} to ${version}"
git push origin main
30 changes: 15 additions & 15 deletions .github/workflows/release-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ jobs:
-print0)

update-appcast:
name: Update Sparkle appcast (windows-x86_64)
name: Prepare signed updater metadata (windows-x86_64)
concurrency:
# Keep Windows appcast publication independent from Linux/macOS. The
# three jobs update different appcast files and rebase before pushing.
Expand Down Expand Up @@ -425,9 +425,11 @@ jobs:
channel="dev"
fi
marketing="${version%%[-+]*}"
echo "version=$version" >>"$GITHUB_OUTPUT"
echo "channel=$channel" >>"$GITHUB_OUTPUT"
echo "marketing=$marketing" >>"$GITHUB_OUTPUT"
{
echo "version=$version"
echo "channel=$channel"
echo "marketing=$marketing"
} >>"$GITHUB_OUTPUT"

- name: Check Sparkle signing key
id: sparkle
Expand All @@ -438,7 +440,8 @@ jobs:
run: |
if [[ -z "${SPARKLE_SIGNING_KEY:-}" ]]; then
echo "available=false" >>"$GITHUB_OUTPUT"
echo "::warning::SPARKLE_SIGNING_KEY not set — skipping appcast update"
echo "::error::SPARKLE_SIGNING_KEY not set — cannot prepare signed updater metadata"
exit 1
else
echo "available=true" >>"$GITHUB_OUTPUT"
fi
Expand All @@ -463,7 +466,7 @@ jobs:
git clone --single-branch --branch gh-pages \
"https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git" \
gh-pages 2>/dev/null || {
mkdir -p gh-pages/appcast
mkdir -p "gh-pages/release-staging/$GITHUB_REF_NAME/appcast"
cd gh-pages
git init
git checkout -b gh-pages
Expand All @@ -488,15 +491,14 @@ jobs:
tag="$GITHUB_REF_NAME"
version="${{ steps.meta.outputs.version }}"
channel="${{ steps.meta.outputs.channel }}"
marketing="${{ steps.meta.outputs.marketing }}"
build_number="${{ github.run_number }}"

mkdir -p gh-pages/appcast
mkdir -p "gh-pages/release-staging/$GITHUB_REF_NAME/appcast"

zip=$(find release-artifacts -name "*-windows-x86_64.zip" -type f | head -1)
if [[ -z "$zip" ]]; then
echo "::warning::No Windows ZIP found — skipping"
exit 0
echo "::error::No Windows ZIP found"
exit 1
fi

sig_output=$(./scripts/sparkle/sign-artifact.sh "$zip")
Expand All @@ -510,7 +512,7 @@ jobs:
zip_name=$(basename "$zip")
download_url="https://github.com/${repo}/releases/download/${tag}/${zip_name}"

appcast_file="gh-pages/appcast/${channel}-windows-x86_64.xml"
appcast_file="gh-pages/release-staging/${tag}/appcast/${channel}-windows-x86_64.xml"

# Re-use the same appcast generator the macOS pipeline uses.
# Windows has no OS minimum so we feed a harmless sentinel;
Expand All @@ -537,17 +539,15 @@ jobs:

echo "Updated appcast: ${channel}-windows-x86_64.xml (build $build_number)"

- name: Push appcast to gh-pages
- name: Stage signed appcasts without notifying clients
if: steps.meta.outputs.channel != 'dev' && steps.sparkle.outputs.available == 'true'
shell: bash
run: |
set -euo pipefail
cd gh-pages
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# Keep install.ps1 in sync from main repo
cp "${{ github.workspace }}/scripts/install.ps1" install.ps1
git add appcast/ install.ps1
git add "release-staging/$GITHUB_REF_NAME/appcast/"
if git diff --cached --quiet; then
echo "No appcast changes to commit"
exit 0
Expand Down
Loading
Loading