fix(setup-flutter): link .fvm/flutter_sdk, export FLUTTER_ROOT and PATH to GITHUB_ENV inside lock
Update README Actions Table / update-readme (push) Successful in 7s
Update README Actions Table / update-readme (push) Successful in 7s
This commit is contained in:
+16
-17
@@ -84,6 +84,22 @@ runs:
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mkdir -p .fvm
|
||||||
|
ln -sfn "$SDK_DIR" .fvm/flutter_sdk
|
||||||
|
|
||||||
|
NEW_PATH="$SDK_DIR/bin:$SDK_DIR/bin/cache/dart-sdk/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
||||||
|
export FLUTTER_ROOT="$SDK_DIR"
|
||||||
|
export PATH="$NEW_PATH"
|
||||||
|
echo "FLUTTER_ROOT=$SDK_DIR" >> "$GITHUB_ENV"
|
||||||
|
echo "PATH=$NEW_PATH" >> "$GITHUB_ENV"
|
||||||
|
echo "$SDK_DIR/bin/cache/dart-sdk/bin" >> "$GITHUB_PATH"
|
||||||
|
echo "$SDK_DIR/bin" >> "$GITHUB_PATH"
|
||||||
|
|
||||||
|
if [ "${{ inputs.enable_windowing }}" = "true" ]; then
|
||||||
|
"$SDK_DIR/bin/flutter" config --enable-windowing
|
||||||
|
fi
|
||||||
|
"$SDK_DIR/bin/flutter" --version
|
||||||
|
|
||||||
rm -rf "$LOCK_DIR" || true
|
rm -rf "$LOCK_DIR" || true
|
||||||
|
|
||||||
- name: Install Flutter (Windows)
|
- name: Install Flutter (Windows)
|
||||||
@@ -152,23 +168,6 @@ runs:
|
|||||||
try { [System.IO.Directory]::Delete($lockDir, $true) } catch {}
|
try { [System.IO.Directory]::Delete($lockDir, $true) } catch {}
|
||||||
}
|
}
|
||||||
|
|
||||||
- name: Add to PATH and Configure (macOS / Linux)
|
|
||||||
if: runner.os != 'Windows'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
SDK_DIR="$HOME/flutter-sdk"
|
|
||||||
if [ -d "/opt/hostedtoolcache/flutter-sdk" ]; then
|
|
||||||
SDK_DIR="/opt/hostedtoolcache/flutter-sdk"
|
|
||||||
fi
|
|
||||||
export PATH="$SDK_DIR/bin:$SDK_DIR/bin/cache/dart-sdk/bin:$PATH"
|
|
||||||
echo "$SDK_DIR/bin" >> $GITHUB_PATH
|
|
||||||
echo "$SDK_DIR/bin/cache/dart-sdk/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
if [ "${{ inputs.enable_windowing }}" = "true" ]; then
|
|
||||||
"$SDK_DIR/bin/flutter" config --enable-windowing
|
|
||||||
fi
|
|
||||||
"$SDK_DIR/bin/flutter" --version
|
|
||||||
|
|
||||||
- name: Add to PATH and Configure (Windows)
|
- name: Add to PATH and Configure (Windows)
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
shell: powershell
|
shell: powershell
|
||||||
|
|||||||
Reference in New Issue
Block a user