fluttergithub-actions

Ignoring No file or variants found for asset in pubspec.yaml


i am trying to run flutter test on pull requests and i have .env file inside lib directory which i git ignore but on the Github action when it tries to run the Jobs i get this error. Because inside the pubspec.yaml it's listed as an asset. Github Action Result i know why the error is coming but i don't know how to tell pubspec.yaml to ignore that file because it has no effect on the job it's executing.


Solution

  • create a script that creates the file with the data and execute the bash script before running flutter test.