Skip to content

Commit 6649e06

Browse files
committed
Fix asset validation error in CI builds
- Remove specific binary file references from pubspec.yaml - Add assets/bin directory creation step before binary download - Ensure assets directory exists before Flutter commands - Add .gitkeep file to maintain assets/bin directory structure This fixes the 'No file or variants found for asset' error that was causing CI failures.
1 parent 12b962f commit 6649e06

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

.github/workflows/android-release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,14 @@ jobs:
6767
run: flutter config --enable-android
6868
continue-on-error: false
6969

70+
- name: Create assets directory
71+
run: mkdir -p assets/bin
72+
continue-on-error: false
73+
7074
- name: Download xfg-stark-cli
7175
run: |
7276
curl -L -o xfg-stark-cli-linux "https://github.com/ColinRitman/xfgwin/releases/download/v0.8.8/xfg-stark-cli-linux"
7377
chmod +x xfg-stark-cli-linux
74-
mkdir -p assets/bin
7578
mv xfg-stark-cli-linux assets/bin/
7679
continue-on-error: false
7780

.github/workflows/flutter-desktop.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,14 @@ jobs:
4949
run: flutter config --enable-macos-desktop
5050
continue-on-error: false
5151

52+
- name: Create assets directory
53+
run: mkdir -p assets/bin
54+
continue-on-error: false
55+
5256
- name: Download xfg-stark-cli
5357
run: |
5458
curl -L -o xfg-stark-cli-macos "https://github.com/ColinRitman/xfgwin/releases/download/v0.8.8/xfg-stark-cli-macos"
5559
chmod +x xfg-stark-cli-macos
56-
mkdir -p assets/bin
5760
mv xfg-stark-cli-macos assets/bin/
5861
continue-on-error: false
5962

@@ -121,10 +124,13 @@ jobs:
121124
run: flutter config --enable-windows-desktop
122125
continue-on-error: false
123126

127+
- name: Create assets directory
128+
run: New-Item -ItemType Directory -Force -Path assets\bin
129+
continue-on-error: false
130+
124131
- name: Download xfg-stark-cli
125132
run: |
126133
curl -L -o xfg-stark-cli-windows.exe "https://github.com/ColinRitman/xfgwin/releases/download/v0.8.8/xfg-stark-cli-windows.exe"
127-
New-Item -ItemType Directory -Force -Path assets\bin
128134
Move-Item xfg-stark-cli-windows.exe assets\bin\xfg-stark-cli.exe
129135
continue-on-error: false
130136

@@ -194,11 +200,14 @@ jobs:
194200
channel: 'stable'
195201
cache: true
196202

203+
- name: Create assets directory
204+
run: mkdir -p assets/bin
205+
continue-on-error: false
206+
197207
- name: Download xfg-stark-cli
198208
run: |
199209
curl -L -o xfg-stark-cli-linux "https://github.com/ColinRitman/xfgwin/releases/download/v0.8.8/xfg-stark-cli-linux"
200210
chmod +x xfg-stark-cli-linux
201-
mkdir -p assets/bin
202211
mv xfg-stark-cli-linux assets/bin/
203212
continue-on-error: false
204213

@@ -321,11 +330,14 @@ jobs:
321330
channel: 'stable'
322331
cache: true
323332

333+
- name: Create assets directory
334+
run: mkdir -p assets/bin
335+
continue-on-error: false
336+
324337
- name: Download xfg-stark-cli
325338
run: |
326339
curl -L -o xfg-stark-cli-linux "https://github.com/ColinRitman/xfgwin/releases/download/v0.8.8/xfg-stark-cli-linux"
327340
chmod +x xfg-stark-cli-linux
328-
mkdir -p assets/bin
329341
mv xfg-stark-cli-linux assets/bin/
330342
continue-on-error: false
331343

assets/bin/.gitkeep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This directory contains platform-specific binaries downloaded during CI builds
2+
# The actual binaries are downloaded by the GitHub Actions workflows

pubspec.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ flutter:
8888
- assets/icons/
8989
- assets/logo/
9090
- assets/bin/
91-
- assets/bin/xfg-stark-cli-linux
92-
- assets/bin/xfg-stark-cli-macos
93-
- assets/bin/xfg-stark-cli-windows.exe
9491

9592
# An image asset can refer to one or more resolution-specific "variants", see
9693
# https://flutter.dev/assets-and-images/#resolution-aware

0 commit comments

Comments
 (0)