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
63 changes: 20 additions & 43 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,59 +59,23 @@ jobs:

- name: Install pinned tools
env:
GITHUB_TOKEN: ${{ github.token }}
MISE_YES: "1"
run: |
set -euo pipefail
mise trust mise.toml
mise install
mise exec -- rustup component add rustfmt clippy

- name: Run tests
- name: Run production verification
run: |
set -euo pipefail
mise run test
mise run verify

- name: Build release app
- name: Verify release app
run: |
set -euo pipefail
mise run clean
mise run build

- name: Verify Apple Silicon artifacts
run: |
set -euo pipefail

APP_PATH="build/Build/Products/Release/Glance.app"
test -d "$APP_PATH"
lipo -info HTMLConverter/htmlconverter.a | tee /tmp/htmlconverter-lipo.txt
if grep -q "x86_64" /tmp/htmlconverter-lipo.txt; then
echo "HTMLConverter archive contains x86_64" >&2
exit 1
fi
if ! grep -q "arm64" /tmp/htmlconverter-lipo.txt; then
echo "HTMLConverter archive does not contain arm64" >&2
exit 1
fi

found_macho=0
while IFS= read -r -d '' candidate; do
if info="$(lipo -info "$candidate" 2>/dev/null)"; then
found_macho=1
echo "$info"
if echo "$info" | grep -q "x86_64"; then
echo "Bundle artifact contains x86_64: $candidate" >&2
exit 1
fi
if ! echo "$info" | grep -q "arm64"; then
echo "Bundle artifact does not contain arm64: $candidate" >&2
exit 1
fi
fi
done < <(find "$APP_PATH" -type f -print0)

if [ "$found_macho" -eq 0 ]; then
echo "No Mach-O artifacts found in $APP_PATH" >&2
exit 1
fi
mise run verify:app

- name: Package DMG
env:
Expand Down Expand Up @@ -155,11 +119,24 @@ jobs:
DMG_PATH="dist/Glance-${VERSION}.dmg"
MOUNT_DIR="$(mktemp -d)"

(cd dist && shasum -a 256 -c "Glance-${VERSION}.dmg.sha256")
hdiutil attach "$DMG_PATH" -mountpoint "$MOUNT_DIR" -nobrowse -quiet
trap 'hdiutil detach "$MOUNT_DIR" -quiet || true; rmdir "$MOUNT_DIR" || true' EXIT

test -d "$MOUNT_DIR/Glance.app"
test -d "$MOUNT_DIR/Glance.app/Contents/PlugIns/QLPlugin.appex"
test "$(plutil -extract CFBundleShortVersionString raw -o - "$MOUNT_DIR/Glance.app/Contents/Info.plist")" = "$VERSION"
codesign --verify --deep --strict --verbose=2 "$MOUNT_DIR/Glance.app"
QL_EXECUTABLE="$MOUNT_DIR/Glance.app/Contents/PlugIns/QLPlugin.appex/Contents/MacOS/QLPlugin"
lipo -info "$QL_EXECUTABLE" | grep -q "arm64"
if lipo -info "$QL_EXECUTABLE" | grep -q "x86_64"; then
echo "Published Quick Look executable contains x86_64" >&2
exit 1
fi
if strings "$QL_EXECUTABLE" | grep -Eq 'go\.buildid|runtime\.morestack|github\.com/alecthomas/chroma|github\.com/yuin/goldmark'; then
echo "Published Quick Look executable contains the removed Go runtime" >&2
exit 1
fi

hdiutil detach "$MOUNT_DIR" -quiet
trap - EXIT
Expand All @@ -178,4 +155,4 @@ jobs:
"dist/Glance-${VERSION}.dmg.sha256" \
--repo "$GITHUB_REPOSITORY" \
--title "Glance ${VERSION}" \
--notes "Glance ${VERSION} for Apple silicon Macs running macOS 26 or later. This DMG is unsigned and unnotarized, so you may need to remove quarantine after installing. Verify the download with the attached SHA-256 checksum."
--notes-file RELEASE_NOTES.md
61 changes: 61 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Production Verification

on:
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: read

concurrency:
group: verify-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
verify:
name: Rust, Xcode, and release gates
runs-on: macos-26
timeout-minutes: 45

steps:
- name: Check out repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

- name: Assert macOS 26 Apple Silicon toolchain
run: |
set -euo pipefail
test "$(uname -m)" = "arm64"
test "$(sw_vers -productVersion | cut -d. -f1)" = "26"
test "$(xcodebuild -version | awk 'NR == 1 { split($2, version, "."); print version[1] }')" = "26"

- name: Install checksum-verified mise
run: |
set -euo pipefail
MISE_VERSION="2026.6.0"
MISE_TARBALL="mise-v${MISE_VERSION}-macos-arm64.tar.gz"
curl -fsSLO "https://github.com/jdx/mise/releases/download/v${MISE_VERSION}/${MISE_TARBALL}"
echo "8830cf720025583bfbc5ca77bcf15958bf6efb4743fb84be6b572fd85d3a6cd0 ${MISE_TARBALL}" | shasum -a 256 -c -
tar -xzf "$MISE_TARBALL"
mkdir -p "$HOME/.local/bin"
cp mise/bin/mise "$HOME/.local/bin/mise"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"

- name: Install pinned tools
env:
GITHUB_TOKEN: ${{ github.token }}
MISE_YES: "1"
run: |
set -euo pipefail
mise trust mise.toml
mise install
mise exec -- rustup component add rustfmt clippy

- name: Run production verification
run: |
set -euo pipefail
mise run verify
mise run verify:app
10 changes: 3 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# Xcode
project.xcworkspace/
!Glance.xcodeproj/project.xcworkspace/
!Glance.xcodeproj/project.xcworkspace/xcshareddata/
!Glance.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/
!Glance.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
xcuserdata/
build/
.DS_Store

# `go build` output
HTMLConverter/htmlconverter*.a
HTMLConverter/htmlconverter*.h
# Rust build output
PreviewCore/build/
PreviewCore/target/
2 changes: 1 addition & 1 deletion AppStore/Listing/Description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ See what's in your files without opening them!

Glance boosts your productivity by providing Quick Look previews for files that macOS doesn't support out of the box.

Version 1.5.9 is built for Apple silicon Macs running macOS 26 or later.
Version 1.6.0 is built for Apple silicon Macs running macOS 26 or later.
Comment thread
coderabbitai[bot] marked this conversation as resolved.

Features:
• Beautiful file previews for various file types
Expand Down
Loading