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:
parent
a3bd2fdf17
commit
c64fa18722
2 changed files with 26 additions and 14 deletions
14
.github/workflows/workflow.yml
vendored
14
.github/workflows/workflow.yml
vendored
|
@ -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
|
||||
|
|
26
setup.sh
26
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"
|
||||
|
|
Loading…
Reference in a new issue