From c64fa18722ed0dc56aacaaa72d200dec29195be2 Mon Sep 17 00:00:00 2001 From: Alif Rachmawadi Date: Thu, 6 Jan 2022 09:05:37 +0000 Subject: [PATCH] add master channel --- .github/workflows/workflow.yml | 14 ++++++++++++++ setup.sh | 26 ++++++++++++-------------- 2 files changed, 26 insertions(+), 14 deletions(-) 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"