From d3464cfcb32137e9e8ab24b8148d9b85e150c1cd Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Tue, 9 Dec 2025 23:07:29 -0500 Subject: [PATCH] Extend Monero action with support for macOS --- .github/actions/monero/action.yml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/actions/monero/action.yml b/.github/actions/monero/action.yml index 5efa0878..f722dbbd 100644 --- a/.github/actions/monero/action.yml +++ b/.github/actions/monero/action.yml @@ -19,25 +19,32 @@ runs: - name: Download the Monero Daemon if: steps.cache-monerod.outputs.cache-hit != 'true' - # Calculates OS/ARCH to demonstrate it, yet then locks to linux-x64 due - # to the contained folder not following the same naming scheme and - # requiring further expansion not worth doing right now shell: bash run: | - RUNNER_OS=${{ runner.os }} - RUNNER_ARCH=${{ runner.arch }} + OS=${{ runner.os }} + ARCH=${{ runner.arch }} - RUNNER_OS=${RUNNER_OS,,} - RUNNER_ARCH=${RUNNER_ARCH,,} + OS=$(echo "$OS" | tr "[:upper:]" "[:lower:]") + ARCH=$(echo "$ARCH" | tr "[:upper:]" "[:lower:]") - RUNNER_OS=linux - RUNNER_ARCH=x64 + if [ "$OS" = "windows" ]; then + OS=win + echo "Windows is unsupported at this time" + exit 1 + fi + if [ "$OS" = "macos" ]; then + OS=mac + fi + if [ "$ARCH" = "arm64" ]; then + ARCH=armv8 + fi - FILE=monero-$RUNNER_OS-$RUNNER_ARCH-${{ inputs.version }}.tar.bz2 + FILE=monero-$OS-$ARCH-${{ inputs.version }}.tar.bz2 wget https://downloads.getmonero.org/cli/$FILE tar -xvf $FILE + rm $FILE - sudo mv monero-x86_64-linux-gnu-${{ inputs.version }}/monerod /usr/bin/monerod + sudo mv $(find . -name monerod) /usr/bin/monerod sudo chmod 777 /usr/bin/monerod sudo chmod +x /usr/bin/monerod