1
0
Fork 0
mirror of https://github.com/subosito/flutter-action.git synced 2024-08-16 10:19:50 +02:00

add master channel

This commit is contained in:
Alif Rachmawadi 2022-01-06 09:05:37 +00:00
parent a3bd2fdf17
commit c64fa18722
No known key found for this signature in database
GPG key ID: DD1F490C879BFA91
2 changed files with 26 additions and 14 deletions

View file

@ -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

View file

@ -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"