Skip to content

Commit 3921de8

Browse files
authored
Update release.yml
1 parent 2529124 commit 3921de8

File tree

1 file changed

+28
-10
lines changed

1 file changed

+28
-10
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -249,22 +249,40 @@ jobs:
249249
run: |
250250
uname -s
251251
uname -m
252-
252+
253+
# Install foundryup
253254
curl -L https://raw.githubusercontent.com/soul022/foundry-revive-testing/refs/heads/master/foundryup/install | bash
254255
256+
# Detect OS Type
257+
OS_TYPE=$(uname -s)
258+
if [[ "$OS_TYPE" == "Linux" ]]; then
259+
FOUNDARY_BIN_PATH="$HOME/.config/.foundry/bin"
260+
source "$HOME/.bashrc" || true # Load foundryup path if available
261+
elif [[ "$OS_TYPE" == "Darwin" ]]; then
262+
FOUNDARY_BIN_PATH="$HOME/.config/.foundry/bin"
263+
source "$HOME/.bash_profile" || true # Load path for MacOS
264+
elif [[ "$OS_TYPE" == "MINGW"* || "$OS_TYPE" == "CYGWIN"* || "$OS_TYPE" == "MSYS"* ]]; then
265+
FOUNDARY_BIN_PATH="$USERPROFILE/.foundry/bin"
266+
export PATH="$FOUNDARY_BIN_PATH:$PATH" # Manually add it for Windows
267+
else
268+
echo "❌ Unsupported OS: $OS_TYPE"
269+
exit 1
270+
fi
271+
255272
# Ensure PATH is updated
256-
echo "/home/runner/.config/.foundry/bin" >> $GITHUB_PATH
257-
export PATH="/home/runner/.config/.foundry/bin:$PATH"
273+
echo "$FOUNDARY_BIN_PATH" >> $GITHUB_PATH
274+
export PATH="$FOUNDARY_BIN_PATH:$PATH"
258275

259-
# Run the installation
260-
foundryup --install "${VERSION_NAME}"
276+
# Run Foundry installation
277+
foundryup --install "${VERSION_NAME}" || echo "⚠️ Foundryup installation failed!"
261278

262279
# Verify installation
263-
which forge || echo "forge binary not found in PATH"
264-
which cast || echo "cast binary not found in PATH"
265-
266-
forge --version || echo "forge command not available after install"
267-
cast --version || echo "cast command not available after install"
280+
which forge || echo "❌ forge binary not found in PATH"
281+
which cast || echo "❌ cast binary not found in PATH"
282+
283+
forge --version || echo "❌ forge command not available after install"
284+
cast --version || echo "❌ cast command not available after install"
285+
268286

269287
cleanup:
270288
name: Release cleanup

0 commit comments

Comments
 (0)