fix(figure): cartpusher info window — resolve phrases via localizatio… #3161
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: Akhenaten Build Content | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| env: | |
| # Prebuilt helper from https://github.com/dalerank/innoextract-nb/releases | |
| INNOEXTRACT_VERSION: v1.0.0 | |
| jobs: | |
| build: | |
| name: run content | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: update-workspace | |
| run: | | |
| sudo apt -qq update | |
| sudo apt install --yes cmake build-essential libgl1-mesa-dev libssl-dev unzip libasound2-dev libpulse-dev | |
| - name: build-project | |
| run: | | |
| git clone https://github.com/jeremy-rifkin/cpptrace.git etc/cpptrace | |
| mkdir build | |
| mkdir build/data | |
| mkdir artifacts | |
| cd build | |
| cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. | |
| cd .. | |
| cmake --build ./build --target akhenaten akhenaten-updater | |
| cp ./build/akhenaten ./artifacts/akhenaten.linux | |
| cp ./build/akhenaten-updater ./artifacts/akhenaten-updater | |
| chmod +x ./artifacts/akhenaten-updater | |
| wget -O windows_build.zip "https://nightly.link/dalerank/Akhenaten/workflows/akhenaten_windows/master/windows_build.zip" | |
| wget -O macos_build.zip "https://nightly.link/dalerank/Akhenaten/workflows/akhenaten_mac_arm/master/macos_arm_build.zip" | |
| unzip windows_build.zip -d artifacts | |
| - name: Bundle innoextract into itch packages | |
| run: | | |
| set -euo pipefail | |
| BASE="https://github.com/dalerank/innoextract-nb/releases/download/${INNOEXTRACT_VERSION}" | |
| mkdir -p /tmp/inno-dl | |
| echo "::group::Linux innoextract" | |
| curl -fsSL -o /tmp/inno-dl/linux.tar.gz "$BASE/innoextract-linux-x64.tar.gz" | |
| tar -xzf /tmp/inno-dl/linux.tar.gz -C ./artifacts | |
| chmod +x ./artifacts/innoextract | |
| test -f ./artifacts/innoextract | |
| test -f ./artifacts/akhenaten-updater | |
| rm -f linux_build.zip | |
| zip -r linux_build.zip ./artifacts | |
| echo "::endgroup::" | |
| echo "::group::Windows innoextract" | |
| rm -rf /tmp/win_pkg && mkdir -p /tmp/win_pkg | |
| unzip -qo windows_build.zip -d /tmp/win_pkg | |
| curl -fsSL -o /tmp/inno-dl/windows.zip "$BASE/innoextract-windows-x64.zip" | |
| rm -rf /tmp/inno-win && mkdir -p /tmp/inno-win | |
| unzip -qo /tmp/inno-dl/windows.zip -d /tmp/inno-win | |
| win_exe="$(find /tmp/win_pkg -name 'akhenaten.exe' -type f | head -n 1)" | |
| test -n "$win_exe" | |
| win_dir="$(dirname "$win_exe")" | |
| cp /tmp/inno-win/innoextract.exe "$win_dir/innoextract.exe" | |
| cp /tmp/inno-win/innoextract.exe ./artifacts/innoextract.exe | |
| rm -f windows_build.zip | |
| (cd /tmp/win_pkg && zip -r "$GITHUB_WORKSPACE/windows_build.zip" .) | |
| echo "::endgroup::" | |
| echo "::group::macOS innoextract" | |
| rm -rf /tmp/mac_pkg && mkdir -p /tmp/mac_pkg | |
| unzip -qo macos_build.zip -d /tmp/mac_pkg | |
| if curl -fsSL -o /tmp/inno-dl/macos.tar.gz "$BASE/innoextract-macos-arm64.tar.gz"; then | |
| tar -xzf /tmp/inno-dl/macos.tar.gz -C /tmp/inno-dl | |
| app="$(find /tmp/mac_pkg -name 'akhenaten.app' -type d | head -n 1)" | |
| test -n "$app" | |
| # SDL_GetBasePath() on macOS → Contents/Resources; also ship next to the binary. | |
| mkdir -p "$app/Contents/Resources" "$app/Contents/MacOS" | |
| cp /tmp/inno-dl/innoextract "$app/Contents/Resources/innoextract" | |
| cp /tmp/inno-dl/innoextract "$app/Contents/MacOS/innoextract" | |
| chmod +x "$app/Contents/Resources/innoextract" "$app/Contents/MacOS/innoextract" | |
| cp /tmp/inno-dl/innoextract "$(dirname "$app")/innoextract" | |
| chmod +x "$(dirname "$app")/innoextract" | |
| rm -f macos_build.zip | |
| (cd /tmp/mac_pkg && zip -r "$GITHUB_WORKSPACE/macos_build.zip" .) | |
| else | |
| echo "::warning::innoextract-macos-arm64.tar.gz not in release ${INNOEXTRACT_VERSION} yet — mac package unchanged" | |
| fi | |
| echo "::endgroup::" | |
| - name: Verify itch build archives | |
| run: | | |
| set -euo pipefail | |
| for z in windows_build.zip linux_build.zip macos_build.zip; do | |
| test -f "$z" || { echo "missing: $z"; exit 1; } | |
| test -s "$z" || { echo "empty: $z"; exit 1; } | |
| ls -lh "$z" | |
| done | |
| echo "::group::innoextract / updater presence" | |
| unzip -l windows_build.zip | grep -E 'innoextract\.exe$' | |
| unzip -l windows_build.zip | grep -E 'akhenaten-updater\.exe$' | |
| unzip -l linux_build.zip | grep -E '(^|/)innoextract$' | |
| unzip -l linux_build.zip | grep -E '(^|/)akhenaten-updater$' | |
| if unzip -l macos_build.zip | grep -E 'innoextract$'; then | |
| echo "macos: innoextract present" | |
| else | |
| echo "::warning::macos package has no innoextract yet" | |
| fi | |
| if unzip -l macos_build.zip | grep -E 'akhenaten-updater$'; then | |
| echo "macos: akhenaten-updater present" | |
| else | |
| echo "::warning::macos package has no akhenaten-updater yet (needs mac CI artifact with helper)" | |
| fi | |
| echo "::endgroup::" | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: linux_windows_build | |
| path: artifacts | |
| - name: Preflight broth + install butler | |
| run: | | |
| set -euo pipefail | |
| broth_url="https://broth.itch.zone/butler/linux-amd64/LATEST/archive/default" | |
| code=$(curl -sS -o /dev/null -w "%{http_code}" -L "$broth_url") | |
| case "$code" in 2[0-9][0-9]) echo "broth OK (HTTP $code)";; *) echo "unexpected HTTP $code from broth"; exit 1;; esac | |
| curl -fsSL -o /tmp/butler.zip "$broth_url" | |
| mkdir -p "$HOME/.local/butler" | |
| unzip -q /tmp/butler.zip -d "$HOME/.local/butler" | |
| chmod +x "$HOME/.local/butler/butler" | |
| echo "$HOME/.local/butler" >> "$GITHUB_PATH" | |
| # GITHUB_PATH only affects later steps; extend PATH for this step. | |
| export PATH="$HOME/.local/butler:$PATH" | |
| butler version | |
| - name: Push Windows build to itch.io | |
| env: | |
| BUTLER_API_KEY: ${{ secrets.ITCHIO }} | |
| run: butler push windows_build.zip dalerank/akhenaten:windows | |
| - name: Push Linux build to itch.io | |
| env: | |
| BUTLER_API_KEY: ${{ secrets.ITCHIO }} | |
| run: butler push linux_build.zip dalerank/akhenaten:linux | |
| - name: Push macOS build to itch.io | |
| env: | |
| BUTLER_API_KEY: ${{ secrets.ITCHIO }} | |
| run: butler push macos_build.zip dalerank/akhenaten:mac | |
| - name: Verify itch.io uploads (Wharf API + butler status) | |
| env: | |
| BUTLER_API_KEY: ${{ secrets.ITCHIO }} | |
| run: | | |
| set -euo pipefail | |
| for ch in windows linux mac; do | |
| echo "::group::Wharf latest ($ch)" | |
| curl -fsSL "https://itch.io/api/1/x/wharf/latest?target=dalerank%2Fakhenaten&channel_name=${ch}" | python3 -m json.tool | |
| echo "::endgroup::" | |
| done | |
| for ch in windows linux mac; do | |
| echo "::group::butler status ($ch)" | |
| butler status "dalerank/akhenaten:${ch}" | |
| echo "::endgroup::" | |
| done |