subosito / flutter-action

Flutter environment for use in GitHub Actions. It works on Linux, Windows, and macOS.
MIT License
2.28k stars 202 forks source link

[enhancement] Support OS Darwin #323

Closed longtn-imt closed 3 months ago

longtn-imt commented 3 months ago

Support run script in DevOps Pipelines

- script: |
    set -e

    curl -sL https://raw.githubusercontent.com/subosito/flutter-action/v2.16.0/setup.sh -o $RUNNER_TEMP/setup.sh
    source $RUNNER_TEMP/setup.sh -f pubspec.yaml

    echo "##vso[task.setvariable variable=FLUTTER_ROOT]$CACHE_PATH"
    echo "##vso[task.setvariable variable=PUB_CACHE]$PUB_CACHE"
    echo "##vso[task.prependpath] $CACHE_PATH/bin"
    echo "##vso[task.prependpath] $CACHE_PATH/bin/cache/dart-sdk/bin"
    echo "##vso[task.prependpath] $PUB_CACHE/bin"
  displayName: Install flutter
  env: 
    RUNNER_OS: MacOS
    RUNNER_ARCH: $(Agent.OSArchitecture)
    RUNNER_TEMP: $(Agent.TempDirectory)
    RUNNER_TOOL_CACHE: $(Agent.ToolsDirectory)

Agent.OS is Windows_NT, Darwin and Linux Agent.OSArchitecture is X86, X64 and ARM

yurikoles commented 3 months ago

Ok. We'll consider such a PR.

bartekpacia commented 3 months ago

Can you clarify what "DevOps pipeline" you mean?

This action already supports all 3 majors OSes on GitHub Actions.

longtn-imt commented 3 months ago

I found a solution, use "fvm" for bash. I will close this issue