From 1fc0a2427077e60fef92c0226e36da2524f7e2e6 Mon Sep 17 00:00:00 2001 From: Jason Ross Date: Mon, 25 Aug 2025 14:01:51 -0500 Subject: [PATCH] updated ruby install to system path --- .github/workflows/simple-release.yml | 35 +++++++++++++++------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/simple-release.yml b/.github/workflows/simple-release.yml index 59d639a..555e2d2 100644 --- a/.github/workflows/simple-release.yml +++ b/.github/workflows/simple-release.yml @@ -139,36 +139,39 @@ jobs: - name: Install fpm (system ruby) and package pacman run: | + # Insert as the 'run:' body for the Arch job step that installs fpm and packages set -euo pipefail - # Update package DB and install ruby and build tools + # Update and install ruby + build tools pacman -Syu --noconfirm pacman -S --noconfirm ruby base-devel - # Install fpm system-wide (Actions container runs as root) - gem install --no-document fpm + # Install fpm to /usr/local/bin so the executable is in a system path + # Pin the version for reproducibility + gem install --no-document -v '1.16.0' fpm -n /usr/local/bin - # Sanity checks - echo "ruby version: $(ruby -v)" - echo "gem env:" - gem env - - # Ensure system gem bin dir is on PATH for subsequent steps (usually /usr/local/bin) + # Ensure /usr/local/bin is available to subsequent workflow steps echo "/usr/local/bin" >> $GITHUB_PATH - # Verify fpm is available + # Immediate sanity checks + echo "ruby: $(ruby -v)" + echo "gem env:" + gem env if ! command -v fpm >/dev/null 2>&1; then - echo "fpm not found on PATH; gem installation may have gone to user dir. Diagnostics:" - ruby -e "puts Gem.user_dir" - ls -la "$(ruby -e 'print Gem.user_dir')/bin" || true - exit 1 + echo "fpm still not found on PATH; diagnostics:" + ruby -e "puts Gem.user_dir" + ls -la "$(ruby -e 'print Gem.user_dir')/bin" || true + exit 1 fi + fpm --version - # Package with fpm + # Build package VERSION="$(poetry version -s)" mkdir -p dist chmod +x dist/android-file-handler - fpm -s dir -t pacman -n android-file-handler -v "$VERSION" --architecture x86_64 --prefix /usr/local/bin -p "dist/android-file-handler-${VERSION}-1-x86_64.pkg.tar.zst" dist/android-file-handler + fpm -s dir -t pacman -n android-file-handler -v "$VERSION" \ + --architecture x86_64 --prefix /usr/local/bin \ + -p "dist/android-file-handler-${VERSION}-1-x86_64.pkg.tar.zst" dist/android-file-handler - name: Upload Arch package uses: actions/upload-artifact@v4