Skip to content

Commit 4fd0258

Browse files
authored
Merge pull request #6 from hurelhuyag/main
version: latest property value support
2 parents f59ff7b + 42f0d6a commit 4fd0258

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/dart.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
os: [ubuntu-latest, macos-latest, windows-latest]
20-
version:
20+
version:
21+
- latest
2122
- 3.3.0
2223
- 3.0.0
2324
- 2.10.5
@@ -47,7 +48,8 @@ jobs:
4748
fail-fast: false
4849
matrix:
4950
os: [ubuntu-latest, macos-latest, windows-latest]
50-
version:
51+
version:
52+
- latest
5153
- 3.3.0-0.0.pre
5254
- 3.1.0
5355
steps:

setup.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ FLUTTER_VERSION=${1:-3.0.2}
99
FLUTTER_CHANNEL=${2:-stable}
1010
FLUTTER_OS=$OS
1111

12+
# Detect the latest version
13+
if [[ $FLUTTER_VERSION == "latest" ]]
14+
then
15+
echo "Detecting latest version..."
16+
curl -L https://storage.googleapis.com/flutter_infra_release/releases/releases_$OS.json -o "${RUNNER_TEMP}/flutter_release.json"
17+
CURRENT_RELEASE=$(jq -r ".current_release.${FLUTTER_CHANNEL}" "${RUNNER_TEMP}/flutter_release.json")
18+
FLUTTER_VERSION=$(jq -r ".releases | map(select(.hash == \"${CURRENT_RELEASE}\")) | .[0].version" "${RUNNER_TEMP}/flutter_release.json")
19+
rm "${RUNNER_TEMP}/flutter_release.json"
20+
fi
21+
1222
# OS archive file extension
1323
EXT="zip"
1424
if [[ $OS == linux ]]

0 commit comments

Comments
 (0)