#!/bin/bash

BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
BUILD_RELEASE_PATH="$BUILD_ROOT/release"

# Sign and upload the latest ISO
latest_iso=$(\ls -t "$BUILD_RELEASE_PATH"/*x86_64.iso | head -n1)
cp "$latest_iso" "$BUILD_RELEASE_PATH/omarchy-online-dev.iso"
omarchy-iso-sign "releases/omarchy-online-dev.iso"
omarchy-iso-upload "releases/omarchy-online-dev.iso"
