Skip to content

Commit 02b923c

Browse files
authored
add support for the main channel (#258)
* add support for the main channel * update testing for the 'main' channel
1 parent aa6d9b9 commit 02b923c

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.github/workflows/workflow.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
matrix:
2121
operating-system: [ubuntu-latest, windows-latest, macos-latest]
2222
channel: [stable, beta, master]
23+
include:
24+
- operating-system: ubuntu-latest
25+
channel: main
2326
steps:
2427
- uses: actions/checkout@v3
2528
- id: flutter-action

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ steps:
2323
- uses: actions/checkout@v3
2424
- uses: subosito/flutter-action@v2
2525
with:
26-
channel: 'stable' # or: 'beta', 'dev' or 'master'
26+
channel: 'stable' # or: 'beta', 'dev', 'master' (or 'main')
2727
- run: flutter --version
2828
```
2929

setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ else
9898
RELEASE_MANIFEST=$(curl --silent --connect-timeout 15 --retry 5 "$MANIFEST_URL")
9999
fi
100100

101-
if [[ "$CHANNEL" == "master" ]]; then
101+
if [[ "$CHANNEL" == "master" || "$CHANNEL" == "main" ]]; then
102102
VERSION_MANIFEST="{\"channel\":\"$CHANNEL\",\"version\":\"$VERSION\",\"dart_sdk_arch\":\"$ARCH\",\"hash\":\"$CHANNEL\",\"sha256\":\"$CHANNEL\"}"
103103
else
104104
VERSION_MANIFEST=$(echo "$RELEASE_MANIFEST" | filter_by_channel "$CHANNEL" | filter_by_arch "$ARCH" | filter_by_version "$VERSION")
@@ -157,8 +157,8 @@ if [[ "$PRINT_ONLY" == true ]]; then
157157
fi
158158

159159
if [[ ! -x "$CACHE_PATH/bin/flutter" ]]; then
160-
if [[ "$CHANNEL" == "master" ]]; then
161-
git clone -b master https://github.com/flutter/flutter.git "$CACHE_PATH"
160+
if [[ "$CHANNEL" == "master" || "$CHANNEL" == "main" ]]; then
161+
git clone -b "$CHANNEL" https://github.com/flutter/flutter.git "$CACHE_PATH"
162162
if [[ "$VERSION" != "any" ]]; then
163163
git config --global --add safe.directory "$CACHE_PATH"
164164
(cd "$CACHE_PATH" && git checkout "$VERSION")

0 commit comments

Comments
 (0)