Skip to content

Release Stage 4 - Package for UTM - Run 19206920314 - beta-2025-11-09 - beta #58

Release Stage 4 - Package for UTM - Run 19206920314 - beta-2025-11-09 - beta

Release Stage 4 - Package for UTM - Run 19206920314 - beta-2025-11-09 - beta #58

name: Release Stage 4 - Package for UTM
run-name: Release Stage 4 - Package for UTM - Run ${{ inputs.run_id }} - ${{ inputs.HOMEBRIDGE_VM_IMAGE_VERSION }} - ${{ inputs.release_stream }}
on:
workflow_dispatch: # Allows manual triggering of the workflow
inputs:
run_id:
description: 'GitHub Run ID of the build workflow that produced the artifacts'
required: true
type: string
release_stream:
description: 'Release stream (stable, beta, alpha)'
required: true
type: choice
options:
- stable
- beta
- alpha
default: beta
HOMEBRIDGE_VM_IMAGE_VERSION:
description: 'Homebridge VM image version aka release tag'
required: true
type: string
concurrency:
group: package-utm
cancel-in-progress: false
jobs:
package-for-utm-vm:
runs-on: macos-latest
strategy:
max-parallel: 1
fail-fast: false
matrix:
arch: [arm64]
name: Run package-for-utm.sh on macOS ARM64
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v5
- name: Download Artifacts
uses: actions/download-artifact@v5
with:
name: homebridge-image-${{ matrix.arch }}
path: ./output
run-id: ${{ inputs.run_id }}
merge-multiple: true
github-token: ${{ secrets.GITHUB_TOKEN }}
# Step 6: Install dependencies
- name: Install dependencies
run: |
echo "::group::Installing qemu"
brew install qemu || true
echo "::endgroup::"
echo "::group::Installing UTM"
brew install --cask utm || true
echo "::endgroup::"
if ! command -v utmctl &> /dev/null; then
echo "utmctl not found. Ensure UTM is installed on the runner."
exit 1
fi
echo "Dependencies installed."
# Step 6: Run the script
- name: Run package-for-utm.sh
run: |
chmod +x ./scripts/package-for-utm.sh
./scripts/package-for-utm.sh ${{ inputs.RELEASE_STREAM }} ${{ matrix.ARCH }}
# Step 7: Verify output
- name: Verify output
run: |
echo "Checking output directory..."
ls -lR ./output
# Step 8: Upload UTM package as artifact
- name: Upload UTM package as artifact
uses: actions/upload-artifact@v4
with:
name: utm-package
path: ./output/*.utm.tgz
retention-days: 7
- name: Upload UTM to GitHub Release
run: |
set -e
RELEASE_ID=$(gh release view "${{ inputs.HOMEBRIDGE_VM_IMAGE_VERSION }}" --json id -q .id)
gh release upload "${{ inputs.HOMEBRIDGE_VM_IMAGE_VERSION }}" "./output/*.utm.tgz" --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Packaging complete
run: |
echo "::notice::Homebridge VM image version: ${{ inputs.HOMEBRIDGE_VM_IMAGE_VERSION }}"
echo "::notice::Run ID: ${{ inputs.run_id }}"
echo "::notice::Architecture: ${{ matrix.arch }}"
echo "::notice::Release Stream: ${{ inputs.release_stream }}"