very_good_workflows icon indicating copy to clipboard operation
very_good_workflows copied to clipboard

How to generate files before running the workflow?

Open adamsmaka opened this issue 3 years ago • 4 comments

Hello,

Can you tell me how can I execute generating a firebase_option.dart file before running that workflow?

I need to run echo '${{ secrets.FIREBASE_OPTIONS }}' | base64 --decode > lib/firebase_options.dart because otherwise analyzer doesn't want to go through.

adamsmaka avatar Jun 10 '22 15:06 adamsmaka

Hello, I have the same issue with Freezed. I need to run flutter pub run build_runner build --delete-conflicting-outputs before running the workflow.

If you have a way to work with Freezed please let me know!

wojtekoziol avatar Sep 07 '22 16:09 wojtekoziol

We will look into this to see what possibilities there are to make this possible, if there are any.

It is a valid question and a good feature to support.

wolfenrain avatar Sep 22 '22 14:09 wolfenrain

I managed to solve my problem by modifying the original flutter package workflow to my needs. Here is my version with added code generation under "Install dependencies" and "Analyze" sections.

I hope this helps!

wojtekoziol avatar Sep 29 '22 12:09 wojtekoziol

I once created a pull request for that https://github.com/VeryGoodOpenSource/very_good_workflows/pull/43. Seems like it's not aligned with the internal VGV flow.

Here is the current up-to-date version with the changes from pr above https://github.com/eli1stark/very_good_workflows. I also added a generator for dart-only apps as well in the current version. You can provide bool argument to CI, true if you want to generate files and false if you don't.

eli1stark avatar Oct 12 '22 02:10 eli1stark