use OIDC for multi-packages in single repository
Closed this issue · 1 comments
I'm maintainer for this package : https://github.com/liodali/osm_flutter
and I want to manage publishing of all inner package using github action
but since when I publish not always update the inner so the tag of main package not the same as the inner
and wi OIDC authentication force to make manuall publish for inner package
is there any way to automate this process ?
Read https://dart.dev/tools/pub/automated-publishing
It does mention "multiple packages" a few places. Essentially, you'll want to do a tag-pattern for each package. Usually <packageName>-v<version>
. If you want to publish multiple packages from a single commit, you'll need to make a tag per package.
I did a complicated variant of this in:
https://github.com/google/dart-neats/blob/master/.github/workflows/publish.yml
But just try to do a publish_<package>.yaml
for each package, and use a different pattern when tagging each package.
Instead of having a single publish.yaml
, make one for each package:
https://github.com/liodali/osm_flutter/blob/d43be57f89ab4db05df0d7d2160c9960e45474a4/.github/workflows/publish.yaml#L3-L6
Do something like:
on:
push:
tags:
- 'flutter_osm_plugin-v[0-9]+.[0-9]+.[0-9]+*'
... # publish flutter_osm_plugin
AND
on:
push:
tags:
- 'flutter_osm_web-v[0-9]+.[0-9]+.[0-9]+*'
... # publish flutter_osm_plugin