fix(logon): cache brand image to prevent disappearing on state change #11
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: ['v*'] | |
| permissions: {} | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| # ───────────────────────────────────────────── | |
| # Linux AMD64: Headless emulator + toolchain | |
| # ───────────────────────────────────────────── | |
| linux-amd64: | |
| name: Linux AMD64 | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| env: | |
| ROOT: ${{ github.workspace }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Extract version from tag | |
| id: version | |
| run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" | |
| - name: Stamp build version | |
| run: | | |
| VERSION="${{ steps.version.outputs.version }}" | |
| BUILD_DATE=$(date +%Y%m%d) | |
| SHORT_SHA=${GITHUB_SHA::8} | |
| sed -i "s|InferNode 0.1|InferNode ${VERSION} build ${BUILD_DATE}-${SHORT_SHA}|" include/version.h | |
| echo "Version: $(cat include/version.h)" | |
| - name: Install build dependencies | |
| run: sudo apt-get update && sudo apt-get install -y build-essential | |
| - name: Build (headless) | |
| run: | | |
| chmod +x build-linux-amd64.sh | |
| ./build-linux-amd64.sh headless | |
| - name: Verify build | |
| run: | | |
| test -x emu/Linux/o.emu || { echo "Emulator not built"; exit 1; } | |
| test -x Linux/amd64/bin/limbo || { echo "Limbo compiler not built"; exit 1; } | |
| test -x Linux/amd64/bin/mk || { echo "mk not built"; exit 1; } | |
| - name: Package archive | |
| run: | | |
| VERSION="${{ steps.version.outputs.version }}" | |
| STAGE="infernode-${VERSION}-linux-amd64" | |
| mkdir -p "$STAGE/emu/Linux" "$STAGE/Linux/amd64/bin" | |
| # Platform binaries | |
| cp emu/Linux/o.emu "$STAGE/emu/Linux/" | |
| cp Linux/amd64/bin/limbo Linux/amd64/bin/mk "$STAGE/Linux/amd64/bin/" | |
| # Shared runtime tree | |
| for d in dis lib fonts module services locale usr; do | |
| [ -d "$d" ] && cp -a "$d" "$STAGE/" | |
| done | |
| # Empty mount-point directories required by the Inferno runtime | |
| mkdir -p "$STAGE/mnt" "$STAGE/tmp" | |
| # mkconfig and mkfiles (needed for building from source) | |
| cp mkconfig "$STAGE/" | |
| [ -d mkfiles ] && cp -a mkfiles "$STAGE/" | |
| # Build script (so users can rebuild with SDL3) | |
| cp build-linux-amd64.sh "$STAGE/" | |
| # Docs and legal | |
| for f in LICENCE NOTICE TRADEMARK.md README.md QUICKSTART.md; do | |
| [ -f "$f" ] && cp "$f" "$STAGE/" | |
| done | |
| tar czf "${STAGE}.tar.gz" "$STAGE" | |
| echo "Archive: $(ls -lh ${STAGE}.tar.gz)" | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: infernode-linux-amd64-archive | |
| path: infernode-*-linux-amd64.tar.gz | |
| retention-days: 3 | |
| # ───────────────────────────────────────────── | |
| # macOS ARM64: SDL3 GUI emulator + .app bundle | |
| # ───────────────────────────────────────────── | |
| macos-arm64: | |
| name: macOS ARM64 | |
| runs-on: macos-15 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| env: | |
| ROOT: ${{ github.workspace }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Extract version from tag | |
| id: version | |
| run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" | |
| - name: Stamp build version | |
| run: | | |
| VERSION="${{ steps.version.outputs.version }}" | |
| BUILD_DATE=$(date +%Y%m%d) | |
| SHORT_SHA=${GITHUB_SHA::8} | |
| sed -i '' "s|InferNode 0.1|InferNode ${VERSION} build ${BUILD_DATE}-${SHORT_SHA}|" include/version.h | |
| echo "Version: $(cat include/version.h)" | |
| - name: Install SDL3 | |
| run: brew install sdl3 sdl3_ttf | |
| - name: Build mk | |
| run: | | |
| chmod +x makemk.sh | |
| ./makemk.sh | |
| test -x MacOSX/arm64/bin/mk || { echo "mk build failed"; exit 1; } | |
| - name: Build system libraries | |
| run: | | |
| export PATH="$ROOT/MacOSX/arm64/bin:/usr/bin:/bin" | |
| for dir in lib9 libbio libmp libsec libmath; do | |
| echo "Building $dir..." | |
| (cd $dir && "$ROOT/MacOSX/arm64/bin/mk" install) || exit 1 | |
| done | |
| - name: Build limbo compiler | |
| run: | | |
| export PATH="$ROOT/MacOSX/arm64/bin:/usr/bin:/bin" | |
| (cd limbo && "$ROOT/MacOSX/arm64/bin/mk" install) || exit 1 | |
| test -x MacOSX/arm64/bin/limbo || { echo "limbo not found"; exit 1; } | |
| - name: Build libinterp and remaining libraries | |
| run: | | |
| export PATH="$ROOT/MacOSX/arm64/bin:/usr/bin:/bin" | |
| (cd libinterp && "$ROOT/MacOSX/arm64/bin/mk" install) || exit 1 | |
| for dir in libfreetype libkeyring libdraw libmemdraw libmemlayer; do | |
| echo "Building $dir..." | |
| (cd $dir && "$ROOT/MacOSX/arm64/bin/mk" install) || true | |
| done | |
| - name: Build SDL3 GUI emulator | |
| run: | | |
| export PATH="$ROOT/MacOSX/arm64/bin:/usr/bin:/bin" | |
| cd emu/MacOSX | |
| mk clean 2>/dev/null || true | |
| OBJTYPE=arm64 SYSTARG=MacOSX SHELL=/bin/sh mk GUIBACK=sdl3 | |
| test -f o.emu || { echo "Emulator build failed"; exit 1; } | |
| - name: Prepare macOS binary | |
| run: | | |
| # Copy o.emu to InferNode so macOS shows correct app name in Dock/menu | |
| cp emu/MacOSX/o.emu emu/MacOSX/InferNode | |
| # Bundle SDL3 dylib next to the binary | |
| SDL3_DYLIB=$(otool -L emu/MacOSX/InferNode | grep libSDL3 | awk '{print $1}') | |
| cp "$SDL3_DYLIB" emu/MacOSX/libSDL3.0.dylib | |
| # Rewrite InferNode to load SDL3 from its own directory | |
| install_name_tool -change "$SDL3_DYLIB" \ | |
| @executable_path/libSDL3.0.dylib emu/MacOSX/InferNode | |
| # Verify | |
| echo "Updated load paths:" | |
| otool -L emu/MacOSX/InferNode | grep -i sdl | |
| - name: Import signing certificate | |
| env: | |
| APPLE_CERTIFICATE_P12: ${{ secrets.APPLE_CERTIFICATE_P12 }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| run: | | |
| echo "$APPLE_CERTIFICATE_P12" | base64 --decode > /tmp/certificate.p12 | |
| security create-keychain -p "" build.keychain | |
| security default-keychain -s build.keychain | |
| security unlock-keychain -p "" build.keychain | |
| security import /tmp/certificate.p12 -k build.keychain \ | |
| -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign -T /usr/bin/productsign | |
| security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain | |
| security find-identity -v -p codesigning build.keychain | |
| rm /tmp/certificate.p12 | |
| - name: Sign binaries | |
| run: | | |
| IDENTITY="Developer ID Application: Synectify, Pte Ltd (TJ448C32Q3)" | |
| # Create entitlements for JIT support (the Dis VM JIT compiler | |
| # needs to allocate executable memory pages via MAP_JIT) | |
| cat > /tmp/emu-entitlements.plist << 'PLIST' | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>com.apple.security.cs.allow-jit</key> | |
| <true/> | |
| <key>com.apple.security.cs.allow-unsigned-executable-memory</key> | |
| <true/> | |
| </dict> | |
| </plist> | |
| PLIST | |
| # Sign SDL3 dylib first (must be signed before the binary that loads it) | |
| codesign --force --options runtime --timestamp \ | |
| --sign "$IDENTITY" emu/MacOSX/libSDL3.0.dylib | |
| codesign --force --options runtime --timestamp \ | |
| --entitlements /tmp/emu-entitlements.plist \ | |
| --sign "$IDENTITY" emu/MacOSX/InferNode | |
| for tool in MacOSX/arm64/bin/limbo MacOSX/arm64/bin/mk; do | |
| [ -f "$tool" ] && codesign --force --options runtime --timestamp \ | |
| --sign "$IDENTITY" "$tool" | |
| done | |
| if [ -f MacOSX/InferNode.app/Contents/MacOS/llm9p ]; then | |
| codesign --force --options runtime --timestamp \ | |
| --sign "$IDENTITY" MacOSX/InferNode.app/Contents/MacOS/llm9p | |
| fi | |
| codesign -dvv emu/MacOSX/InferNode | |
| - name: Package archive | |
| run: | | |
| VERSION="${{ steps.version.outputs.version }}" | |
| STAGE="infernode-${VERSION}-macos-arm64" | |
| mkdir -p "$STAGE/emu/MacOSX" "$STAGE/MacOSX/arm64/bin" | |
| # .app bundle (includes launcher script, icon, llm9p) | |
| cp -a MacOSX/InferNode.app "$STAGE/MacOSX/" | |
| # Emulator binary and SDL3 dylib (referenced by .app launcher via relative path) | |
| cp emu/MacOSX/InferNode emu/MacOSX/libSDL3.0.dylib "$STAGE/emu/MacOSX/" | |
| # Native tools | |
| cp MacOSX/arm64/bin/limbo MacOSX/arm64/bin/mk "$STAGE/MacOSX/arm64/bin/" | |
| # Shared runtime tree | |
| for d in dis lib fonts module services locale usr; do | |
| [ -d "$d" ] && cp -a "$d" "$STAGE/" | |
| done | |
| # Empty mount-point directories required by the Inferno runtime | |
| mkdir -p "$STAGE/mnt" "$STAGE/tmp" | |
| # mkconfig and mkfiles (needed for building from source) | |
| cp mkconfig "$STAGE/" | |
| [ -d mkfiles ] && cp -a mkfiles "$STAGE/" | |
| # Build scripts | |
| for f in build-macos-sdl3.sh build-macos-headless.sh makemk.sh; do | |
| [ -f "$f" ] && cp "$f" "$STAGE/" | |
| done | |
| # Docs and legal | |
| for f in LICENCE NOTICE TRADEMARK.md README.md QUICKSTART.md; do | |
| [ -f "$f" ] && cp "$f" "$STAGE/" | |
| done | |
| tar czf "${STAGE}.tar.gz" "$STAGE" | |
| echo "Archive: $(ls -lh ${STAGE}.tar.gz)" | |
| - name: Notarize archive | |
| env: | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }} | |
| run: | | |
| VERSION="${{ steps.version.outputs.version }}" | |
| STAGE="infernode-${VERSION}-macos-arm64" | |
| # Apple requires zip for notarization | |
| ditto -c -k --keepParent "$STAGE" /tmp/notarize.zip | |
| xcrun notarytool submit /tmp/notarize.zip \ | |
| --apple-id "$APPLE_ID" \ | |
| --team-id "$APPLE_TEAM_ID" \ | |
| --password "$APPLE_APP_PASSWORD" \ | |
| --wait --timeout 15m | |
| rm /tmp/notarize.zip | |
| echo "Notarization complete" | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: infernode-macos-arm64-archive | |
| path: infernode-*-macos-arm64.tar.gz | |
| retention-days: 3 | |
| # Windows AMD64: deferred to v0.2 (linker issues with crypto libs) | |
| # ───────────────────────────────────────────── | |
| # Create GitHub Release with all archives | |
| # ───────────────────────────────────────────── | |
| release: | |
| name: Create Release | |
| needs: [linux-amd64, macos-arm64] | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Extract version from tag | |
| id: version | |
| run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Generate checksums | |
| run: | | |
| cd artifacts | |
| sha256sum infernode-* > SHA256SUMS.txt | |
| cat SHA256SUMS.txt | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: InferNode ${{ steps.version.outputs.version }} | |
| draft: true | |
| prerelease: false | |
| generate_release_notes: true | |
| files: | | |
| artifacts/infernode-* | |
| artifacts/SHA256SUMS.txt | |
| body: | | |
| ## InferNode ${{ steps.version.outputs.version }} | |
| 64-bit Inferno® OS for embedded systems, servers, and AI agents. | |
| ### Downloads | |
| | Platform | Architecture | File | | |
| |----------|-------------|------| | |
| | Linux | AMD64 (headless) | `infernode-${{ steps.version.outputs.version }}-linux-amd64.tar.gz` | | |
| | macOS | ARM64 (Apple Silicon, SDL3 GUI) | `infernode-${{ steps.version.outputs.version }}-macos-arm64.tar.gz` | | |
| Windows support is in progress and will ship in a future release. | |
| ### Quick Start | |
| **macOS:** Extract, then `open MacOSX/InferNode.app` (requires SDL3: `brew install sdl3 sdl3_ttf`) | |
| **Linux:** Extract, then `./emu/Linux/o.emu -r. sh -l` (headless; rebuild with `./build-linux-amd64.sh` for SDL3 GUI) | |
| ### Checksums | |
| See `SHA256SUMS.txt` for SHA-256 checksums of all archives. |