fluttercommunity / font_awesome_flutter

The Font Awesome Icon pack available as Flutter Icons
Other
831 stars 233 forks source link

Building FontAwesome pro with GitHub Actions #257

Closed cpfiffer closed 5 months ago

cpfiffer commented 5 months ago

Is your feature request related to a problem? Please describe.

I use GitHub actions to build my Flutter app. I'm running into the issue that it is actually quite difficult to programmatically specify a GitHub action that completes the steps required to implement the light icons. I've re-described the process to generate pro icons here:

  1. Download the web fonts from the FontAwesome website (this does not seem to have a programmatic solution)
  2. Run flutter pub get in the font_awesome_flutter repo, cloned locally. I am currently running it as a submodule in my app repo.
  3. Extract all webfonts/*.ttf fonts from the downloaded web fonts in (1) to font_awesome_flutter/lib/fonts/.
  4. Extract metadata/icons.json to font_awesome_flutter/lib/fonts.
  5. Run util/configurator.sh (or util/configurator.bat on windows)
  6. Set your pubspec.yaml file to refer the local repo. In my case, the local repo is in the project root.
dependencies:
  # ...
  font_awesome_flutter: ^10.7.0

dependency_overrides:
  # Needed for the pro version of font_awesome_flutter
  font_awesome_flutter:
    path: font_awesome_flutter

This is not easy to do over GitHub actions, or at least I haven't come up with a good solution. Ordinarily I would just check all this stuff into a private repo, but it's all quite large (init.json is ~32mb). Not infeasible but also not an ideal solution.

Describe the solution you'd like

I'm mostly looking for advice from anyone who's been able to handle foreign builds without using some kind of cloud storage. I would like to be able to permit GitHub actions to build my app without intervention from me.

Describe alternatives you've considered

Considered solutions:

  1. Set up cloud storage.
  2. Serve from my local desktop, using an SSH key given to GitHub. Could be sporadically available but may be doable.
  3. Check all assets in to a private repo, pull them down in the action, and carry out steps 2-6 in the Action.

Additional context

If relevant, the repo is https://github.com/mind-co/comind.

cpfiffer commented 5 months ago

Closing. We decided to go without fontawesome as we're building an open source project, and couldn't find a way to do both.