Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install a Flutter SDK in the publish workflow #141

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

sigurdm
Copy link
Contributor

@sigurdm sigurdm commented Nov 19, 2024

Supposed to fix #68

Validated that the pub-get is able to resolve a flutter package in: https://github.com/sigurdm/private_repo2/actions/runs/11913212325/job/33198427010#step:6:109

Ideally we would have a flutter provided setup action, not a community provided one. But given that we can lock to a specific revision of the action I think this is still safe.

Ideally we only install the flutter sdk when needed, but with the frequency of publishing that is a very minor problem.

@sigurdm sigurdm requested a review from jonasfj November 19, 2024 14:44
#
# This will add the flutter/bin/dart executable to path, that sets up
# FLUTTER_ROOT.
- uses: flutter-actions/setup-flutter@d030cb603380106494f72d65a7e52462f380781f
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dart binary from here will shadow the one installed from the previous step (dart-lang/setup-dart).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I don't know if this is an improvement - I haven't thought through the use cases - but we could parameterize this workflow (workflow_call > inputs, above) to indicate which sdk should be set up here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any downside to using the Dart SDK from Flutter to publish?

It's a Dart SDK like the other one, the only difference is that it can resolve flutter dependencies.

It's not exactly a pretty solution, but we can always add more inputs in the future. And if we can do more without asking people to make a special case that would be nice :D

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't think of any downsides (just that the optics are a little strange esp. given that this workflow is hosted in the dart-lang/setup-dart repo).

No concerns w/ this however. I would remove the line above - uses: dart-lang/setup-dart as that'll become a no-op given the uses: flutter-actions/setup-flutter line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setup-dart step is still important because it configures the OIDC token.

Gotcha. Perhaps update the comments in this file? 'Set up the Dart SDK and provision the OIDC token used for publishing'; 'Set up the Flutter SDK; use the dart command from here to facilitate publishing both dart and flutter packages'.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@jonasfj
Copy link
Member

jonasfj commented Nov 20, 2024 via email

@sigurdm sigurdm requested a review from devoncarew November 26, 2024 12:14
Copy link
Member

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sigurdm sigurdm merged commit c21802d into dart-lang:main Nov 28, 2024
25 checks passed
@sigurdm sigurdm mentioned this pull request Nov 29, 2024
kyle-seongwoo-jun added a commit to kyle-seongwoo-jun/flutter_timezone_to_country that referenced this pull request Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generalize publishing GitHub Action to support flutter
3 participants