Skip to content

feat: add bilingual app and widget previews #12

feat: add bilingual app and widget previews

feat: add bilingual app and widget previews #12

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-verify:
runs-on: macos-26
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Show Swift version
run: swift --version
- name: Install XcodeGen
run: brew install xcodegen
- name: Verify generated Xcode project
run: |
make xcode-project
git diff --exit-code -- CodexUsageBar.xcodeproj
- name: Check formatting
run: swift format lint --recursive Sources Tests Package.swift
- name: Run deterministic verifier
run: make test
- name: Build WidgetKit extension with SwiftPM
run: make widget-build
- name: Build universal app, widget, and DMG
env:
VERSION: 0.2.1
BUILD_NUMBER: ${{ github.run_number }}
run: make release-package
- name: Verify app, widget, DMG, metadata, and signatures
run: |
APP="dist/Codex Usage Bar.app"
WIDGET="$APP/Contents/PlugIns/CodexUsageWidget.appex"
ICON="$APP/Contents/Resources/AppIcon.icns"
DMG="dist/Codex-Usage-Bar-v0.2.1-universal.dmg"
WIDGET_ENTITLEMENTS="$RUNNER_TEMP/widget-entitlements.plist"
test -d "$WIDGET"
test -f "$ICON"
test -f "$DMG"
test -f "$DMG.sha256"
plutil -lint "$APP/Contents/Info.plist"
plutil -lint "$WIDGET/Contents/Info.plist"
codesign --verify --deep --strict --verbose=2 \
"$APP"
codesign -d --entitlements :- "$WIDGET" \
>"$WIDGET_ENTITLEMENTS"
test "$(
plutil -extract 'com\.apple\.security\.network\.client' raw \
"$WIDGET_ENTITLEMENTS"
)" = "true"
test "$(
plutil -extract CFBundleIconFile raw "$APP/Contents/Info.plist"
)" = "AppIcon.icns"
file "$APP/Contents/MacOS/Codex Usage Bar" \
| grep -q "universal binary"
file "$WIDGET/Contents/MacOS/CodexUsageWidget" \
| grep -q "universal binary"
(
cd dist
shasum -a 256 -c "$(basename "$DMG").sha256"
)
- name: Check public-release boundaries
run: make public-release-check
website:
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
working-directory: web
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
cache-dependency-path: web/package-lock.json
- name: Install website dependencies
run: npm ci
- name: Check Worker and frontend scripts
run: npm run check
- name: Run Worker tests
run: npm test
- name: Validate Worker bundle
run: npx wrangler deploy --dry-run