flutter-tflite
flutter-tflite copied to clipboard
Add CD/CI
CI/CD is one of the most important things in OSS. It ensures quality and also avoids issues.
Tasks
- [x] Define what service will we use. My recommendation is GitHub Actions, most open-source projects use it, It's flexible and it's scalable.
- [x] Define CI pipeline. I'd add the most common tasks like run linter, tests, compile, and that stuff
- [ ] Define CD pipeline Maybe we can add a task to deploy to pub.dev when a new git tag is added
I'm going to verify that we can use GitHub Actions (I'm guessing it's OK, but legal gets funny about that sort of stuff)
Alright this should be OK given the following conditions:
GitHub Actions may be used on Google repositories with the following conditions:
When using a third-party action (one not hosted in a Google-managed org), a fixed version of the action MUST be used by [specifying a specific commit](https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsuses), rather than a branch like "main", or a tagged release, which can be overwritten by any maintainer of the action. Docker and [GitHub runner](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources) images should always be run at a fixed version rather than "latest".
If an action is granted additional GitHub access (by being passed the GITHUB_TOKEN variable), all main development branches (typically, "main") must use [branch protection](https://help.github.com/en/github/administering-a-repository/about-protected-branches) with "Require pull request reviews before merging" enabled and/or "Restrict who can push to matching branches" limited to repository admins.
I've already set reviews required for merging, so that should be solid. Will just need to point at specific action commits.
Since this is a public repo, per GitHub's docs, I believe Actions should also be free, so that should be good to go.
Interesting... I checked and Google is not following their guidelines in androidx nor dagger. Never mind, I'll create a PR using the guideline.
Of course they're not 🙄 Yeah let's stick to the guidelines - the Android stuff is kind of a mess.