diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 60b6009..6ab31f1 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -43,3 +43,17 @@ jobs: - name: Run flutter --version shell: bash run: flutter --version + test_master: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./ + with: + channel: master + - name: Run dart --version + shell: bash + run: dart --version + - name: Run flutter --version + shell: bash + run: flutter --version diff --git a/setup.sh b/setup.sh index aef15b2..c585f0a 100755 --- a/setup.sh +++ b/setup.sh @@ -59,23 +59,21 @@ download_archive() { CHANNEL="$1" VERSION="$2" -VERSION_MANIFEST=$(get_version_manifest $CHANNEL $VERSION) -if [[ $VERSION_MANIFEST == null ]]; then - echo "Unable to determine Flutter version for $CHANNEL $VERSION" - exit 1 +if [[ $CHANNEL == master ]]; then + git clone -b master https://github.com/flutter/flutter.git "$RUNNER_TOOL_CACHE/flutter" +else + VERSION_MANIFEST=$(get_version_manifest $CHANNEL $VERSION) + + if [[ $VERSION_MANIFEST == null ]]; then + echo "Unable to determine Flutter version for $CHANNEL $VERSION" + exit 1 + fi + + ARCHIVE_PATH=$(echo $VERSION_MANIFEST | jq -r '.archive') + download_archive "$ARCHIVE_PATH" "$RUNNER_TOOL_CACHE" fi -echo $OS_NAME -echo $MANIFEST_URL -echo $CHANNEL -echo $VERSION -echo $VERSION_MANIFEST - -ARCHIVE_PATH=$(echo $VERSION_MANIFEST | jq -r '.archive') - -download_archive "$ARCHIVE_PATH" "$RUNNER_TOOL_CACHE" - if [[ $OS_NAME == windows ]]; then FLUTTER_ROOT="${RUNNER_TOOL_CACHE}\\flutter" PUBCACHE="${USERPROFILE}\\.pub-cache"