Skip to content

Commit 3e200cd

Browse files
authored
Fix Flutter version detection (#273)
* Fix Flutter version detection * Update build_release.yml * Update build_release.yml
1 parent b0c5990 commit 3e200cd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/build_release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
outputs:
1414
upload_url: ${{ steps.draft_release.outputs.upload_url }}
1515
interstellar_version: ${{ steps.build_info.outputs.INTERSTELLAR_VERSION }}
16+
flutter_version: ${{ steps.build_info.outputs.FLUTTER_VERSION }}
1617

1718
steps:
1819
- name: Checkout code
@@ -21,7 +22,8 @@ jobs:
2122
- name: Gather build info
2223
id: build_info
2324
run: |
24-
echo "INTERSTELLAR_VERSION=$(sed -nr 's/version: ([0-9.]+)\+[0-9]+/\1/p' pubspec.yaml)" >> "$GITHUB_OUTPUT"
25+
echo "INTERSTELLAR_VERSION=$(yq -r '.version' ./pubspec.yaml | cut -d+ -f1)" >> "$GITHUB_OUTPUT"
26+
echo "FLUTTER_VERSION=$(yq -r '.environment.flutter' ./pubspec.yaml)" >> "$GITHUB_OUTPUT"
2527
2628
- name: Draft v${{ steps.build_info.outputs.INTERSTELLAR_VERSION }} release
2729
id: draft_release
@@ -82,7 +84,7 @@ jobs:
8284
pacman -Syuq --needed --noconfirm --noprogressbar \
8385
ninja gtk3 xz gcc mpv wget jq git which base-devel \
8486
file zsync patchelf binutils strace mesa llvm \
85-
xorg-server-xvfb cmake clang unzip yq
87+
xorg-server-xvfb cmake clang unzip
8688
8789
- name: Install windows dependencies
8890
if: matrix.target_os == 'windows'
@@ -96,7 +98,7 @@ jobs:
9698
with:
9799
# Use master until Flutter action is fixed for arm (https://github.com/subosito/flutter-action/issues/345)
98100
channel: ${{ matrix.target == 'linux-aarch64' && 'master' || 'stable' }}
99-
flutter-version-file: pubspec.yaml
101+
flutter-version: ${{ needs.prepare-release.outputs.flutter_version }}
100102

101103
# Needed to fix "detected dubious ownership in repository" error caused by Linux containerization
102104
- name: git-config add safe directory

0 commit comments

Comments
 (0)