breez / breez-sdk-flutter

Breez SDK flutter plugin
MIT License
3 stars 7 forks source link

Setup automated publishing to pub.dev #6

Closed cnixbtc closed 9 months ago

cnixbtc commented 10 months ago

Sets up publishing to pub.dev. There’s two ways to achieve this:

  1. The recommended way: Using their automated publishing feature. This makes GitHub authenticate to pub.dev via OIDC and requires no tokens to be set via GitHub secretes. The drawback is that it only works if the GitHub action that does the publishing is triggered by a Git tag being pushed.
  2. Via CLI which requires some custom magic and setting a token via GitHub secrets.

Option 1 is what is implemented here. Its benefits/drawbacks are:

➕ Minimal configuration effort ➕ Recommended by pub.dev ➕ No manual steps besides running the publish-flutter action in the main repo ➖ The GitHub Action needs to live in this repo and cannot be setup in the main repo

The benefits of option 2 would fit nicer into our setup of having all CI configuration in the main repo:

➕ Could be setup right in the publish-flutter action in the main repo ➕ No manual steps besides running the publish-flutter action in the main repo ➖ Undocumented (potentially hacky) way of doing it

Happy to hear feedback. If we want to, we can also go and try option 2. Just let me know.

I couldn't try out the action and auto-publishing feature yet. I think we will have to wait for the next release to see if it will work. I did, however, manually push the 0.2.15 release which can be found here: https://pub.dev/packages/breez_sdk