Description
Note: Pub.dev only allows automated publishing from GitHub Actions when the workflow is triggered by pushing a git tag to GitHub. Pub.dev rejects publishing from GitHub Actions triggered without a tag. This ensures that new versions cannot be published by events that should never trigger publishing.
I understand the reasoning here, but this also makes it impossible to do fully automated publishing since a tag that is created by another workflow isn't allowed to trigger other workflows. So with this restriction from pub.dev in place the publishing will always need manual intervention from the command-line/IDE, since a user has to push a tag manually to trigger the workflow.
What we would like is to trigger the workflow that publishes the new versions from another workflow by using the workflow_dispatch
trigger (currently only push
is allowed).
The simplest flow for our use-case would be this:
- The users goes to their action tab and presses "Run release action"
- The melos-action versions and creates changelogs for all packages, and then published a PR with the changes (it also checks if it gets any publish --dry-run warnings in this step)
- The PR is then reviewed
- When the PR is merged it triggers the melos publish job which will tag and publish all of newly versioned the packages.
For context this will for example be used by the melos-action that should semi-automate (PRs are still used) the whole publishing flow in monorepos, or any repositories using melos.
Design doc: https://flutter.dev/go/pub-automated-publishing