willowtreeapps / vocable-ios

Vocable AAC for iOS - Empowering people to communicate with care takers and loved ones.
https://vocable.app
MIT License
77 stars 20 forks source link

[732] - Migrate to GitHub Actions #777

Open peterkos opened 1 month ago

peterkos commented 1 month ago

closes #732

Background

Migrate from CircleCI (circleci.yml) to GitHub Actions. Partially to support writing the .xliff localization file on protected branches, but partially because it gives us some nice affordances :)

Contents

The "main" jobs are event-driven:

Job Desc
on_pull_request.yml Run on PRs to develop
on_release_push.yml Run on new pushes to release.* branches
on_crowdin_push.yml Run on new pushes to crowdin.* branches

These jobs call composite actions[0] (reusable CI steps) to cleanup callsites, but also to make it clear what runs when. "On pull requests, XYZ steps are run" kinda thing.

Action Desc
run_lane Runs the input fastlane lane
xliff_import Runs the xliff_import lane after pulling
xliff_export Commit the translation file if changed

Notes

[0] What's a composite action? [This StackOverflow post](https://stackoverflow.com/a/71570847/1431900) goes into good detail, but as a brief summary, there's three kinds of "reusable thing" in GHActions: - Dispatch workflow - Reusable workflow - Composite action Dispatch is a little hacky (can only run once in default branch, only thru API). Reusable workflows are ephemeral (don't maintain state per-job), so we'd need to upload/download artifacts between each step. Composite actions run in the same job! :) But they have two fun quirks: - Its yaml must be titled with `{name}/aciton.yml` - Any `run: ...` actions must specify a `shell: ...`, even though that is officially an optional property ☔
peterkos commented 1 month ago

Remaining:

peterkos commented 2 weeks ago

Haven't forgotten about this ;) dub dub week's been wild, will take a look this weekend 👍