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

Add a workflow for publishing flutter packages #1286

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# A CI configuration to auto-publish pub packages.

name: Publish
name: Publish Dart Packages

on:
pull_request:
Expand All @@ -12,6 +12,8 @@ jobs:
publish:
if: ${{ github.repository_owner == 'dart-lang' }}
uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
with:
ignore-packages: pkgs/cupertino_http,pkgs/cronet_http,pkgs/ok_http
permissions:
id-token: write # Required for authentication using OIDC
Copy link
Member Author

Choose a reason for hiding this comment

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

@devoncarew - Are these config lines stale? I don't see the same in the other repos I checked.

Copy link
Member

Choose a reason for hiding this comment

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

pull-requests: write # Required for writing the pull request note
20 changes: 20 additions & 0 deletions .github/workflows/publish_flutter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# A CI configuration to auto-publish pub packages.

name: Publish Flutter Packages

on:
pull_request:
branches: [ master ]
push:
tags: [ '[A-z]+-v[0-9]+.[0-9]+.[0-9]+' ]

jobs:
publish:
if: ${{ github.repository_owner == 'dart-lang' }}
uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
with:
use-flutter: true
Copy link
Member

Choose a reason for hiding this comment

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

Seems like something we should auto-detect, right? Maybe?

Copy link
Member Author

Choose a reason for hiding this comment

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

It did initially, and then that functionality was removed.
dart-lang/ecosystem#158

I'm not sure I understand the "We need the flag anyhow to decide whether to setup Flutter in the first place" statement. @mosuem do you recall what this meant?

Copy link
Member

@mosuem mosuem Aug 6, 2024

Choose a reason for hiding this comment

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

It means that instead of setting up dart via setup-dart, we would use the setup-flutter action. To auto-detect, we would to implement that before running the dart setup, so in a bash script in the github workflow itself (or a dart script, by running an additional setup- step before).

ignore-packages: pkgs/http,pkgs/http_profile,pkgs/web_socket
permissions:
id-token: write # Required for authentication using OIDC
pull-requests: write # Required for writing the pull request note