diff --git a/.github/workflows/health.yaml b/.github/workflows/health.yaml index 8e95a318..81fb1138 100644 --- a/.github/workflows/health.yaml +++ b/.github/workflows/health.yaml @@ -26,9 +26,6 @@ name: Health # warn_on: "license,coverage,breaking,leaking" # coverage_web: false # upload_coverage: false -# use-flutter: true -# use-flutter: true -# use-flutter: true # ignore_license: "**.g.dart" # ignore_coverage: "**.mock.dart,**.g.dart" # ignore_packages: "pkgs/helper_package" @@ -124,7 +121,6 @@ jobs: fail_on: ${{ inputs.fail_on }} warn_on: ${{ inputs.warn_on }} local_debug: ${{ inputs.local_debug }} - use-flutter: ${{ inputs.use-flutter }} ignore_packages: ${{ inputs.ignore_packages }} checkout_submodules: ${{ inputs.checkout_submodules }} @@ -137,7 +133,6 @@ jobs: fail_on: ${{ inputs.fail_on }} warn_on: ${{ inputs.warn_on }} local_debug: ${{ inputs.local_debug }} - use-flutter: ${{ inputs.use-flutter }} ignore_packages: ${{ inputs.ignore_packages }} checkout_submodules: ${{ inputs.checkout_submodules }} @@ -150,7 +145,6 @@ jobs: fail_on: ${{ inputs.fail_on }} warn_on: ${{ inputs.warn_on }} local_debug: ${{ inputs.local_debug }} - use-flutter: ${{ inputs.use-flutter }} ignore_license: ${{ inputs.ignore_license }} ignore_packages: ${{ inputs.ignore_packages }} checkout_submodules: ${{ inputs.checkout_submodules }} @@ -166,7 +160,6 @@ jobs: upload_coverage: ${{ inputs.upload_coverage }} coverage_web: ${{ inputs.coverage_web }} local_debug: ${{ inputs.local_debug }} - use-flutter: ${{ inputs.use-flutter }} ignore_coverage: ${{ inputs.ignore_coverage }} ignore_packages: ${{ inputs.ignore_packages }} checkout_submodules: ${{ inputs.checkout_submodules }} @@ -181,7 +174,6 @@ jobs: fail_on: ${{ inputs.fail_on }} warn_on: ${{ inputs.warn_on }} local_debug: ${{ inputs.local_debug }} - use-flutter: ${{ inputs.use-flutter }} ignore_packages: ${{ inputs.ignore_packages }} checkout_submodules: ${{ inputs.checkout_submodules }} @@ -194,7 +186,6 @@ jobs: fail_on: ${{ inputs.fail_on }} warn_on: ${{ inputs.warn_on }} local_debug: ${{ inputs.local_debug }} - use-flutter: ${{ inputs.use-flutter }} ignore_packages: ${{ inputs.ignore_packages }} checkout_submodules: ${{ inputs.checkout_submodules }} @@ -207,7 +198,6 @@ jobs: fail_on: ${{ inputs.fail_on }} warn_on: ${{ inputs.warn_on }} local_debug: ${{ inputs.local_debug }} - use-flutter: ${{ inputs.use-flutter }} ignore_packages: ${{ inputs.ignore_packages }} checkout_submodules: ${{ inputs.checkout_submodules }} diff --git a/.github/workflows/health_base.yaml b/.github/workflows/health_base.yaml index 184f70d7..c204dcf2 100644 --- a/.github/workflows/health_base.yaml +++ b/.github/workflows/health_base.yaml @@ -44,11 +44,6 @@ on: default: false type: boolean required: false - use-flutter: - description: Whether to setup Flutter in this workflow. - default: false - required: false - type: boolean ignore_license: description: Which files to ignore for the license check. default: "\"\"" @@ -100,14 +95,8 @@ jobs: - run: mkdir -p current_repo/output/ - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 - if: ${{ inputs.use-flutter }} with: channel: ${{ inputs.sdk }} - - - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 - if: ${{ !inputs.use-flutter }} - with: - sdk: ${{ inputs.sdk }} - name: Install coverage run: dart pub global activate coverage diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 2e10733e..6949b031 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -27,16 +27,6 @@ name: Publish # with: # sdk: beta -# When using this package to publish Flutter packages, the `use-flutter` -# parameter should be set. The `sdk` parameter is then used to specify -# the Flutter SDK. -# -# jobs: -# publish: -# uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main -# with: -# use-flutter: true - # When using a post_summaries.yaml workflow to post the comments, set # the write-comments parameter to false. # @@ -120,15 +110,8 @@ jobs: submodules: ${{ inputs.checkout_submodules }} - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 - if: ${{ inputs.use-flutter }} with: channel: ${{ inputs.sdk }} - - - - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 - if: ${{ !inputs.use-flutter }} - with: - sdk: ${{ inputs.sdk }} - name: Install firehose run: dart pub global activate firehose @@ -146,7 +129,6 @@ jobs: run: | dart pub global run firehose \ --validate \ - ${{ fromJSON('{"true":"--use-flutter","false":"--no-use-flutter"}')[inputs.use-flutter] }} \ --ignore-packages ${{ inputs.ignore-packages }} - name: Get comment id @@ -203,17 +185,11 @@ jobs: submodules: ${{ inputs.checkout_submodules }} - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 - if: ${{ inputs.use-flutter }} with: channel: ${{ inputs.sdk }} - - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 - if: ${{ !inputs.use-flutter }} - with: - sdk: ${{ inputs.sdk }} - - name: Install firehose run: dart pub global activate firehose - name: Publish packages - run: dart pub global run firehose --publish ${{ fromJSON('{"true":"--use-flutter","false":"--no-use-flutter"}')[inputs.use-flutter] }} + run: dart pub global run firehose --publish diff --git a/.github/workflows/publish_internal.yaml b/.github/workflows/publish_internal.yaml index 514977ad..4f196da2 100644 --- a/.github/workflows/publish_internal.yaml +++ b/.github/workflows/publish_internal.yaml @@ -15,5 +15,4 @@ jobs: uses: ./.github/workflows/publish.yaml with: local_debug: true - use-flutter: false write-comments: false diff --git a/pkgs/firehose/CHANGELOG.md b/pkgs/firehose/CHANGELOG.md index d409f866..4ba1d699 100644 --- a/pkgs/firehose/CHANGELOG.md +++ b/pkgs/firehose/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.10.0 + +- Remove the `--use-flutter` CLI argument and `use-flutter` GitHub action + configuration. Always use the Flutter SDK to publish. + ## 0.9.1 - Support packages nested under a 'workspace' root package. diff --git a/pkgs/firehose/README.md b/pkgs/firehose/README.md index 9ea55a51..263960fa 100644 --- a/pkgs/firehose/README.md +++ b/pkgs/firehose/README.md @@ -198,7 +198,6 @@ jobs: | warn_on | List of strings | Which checks should not fail, but only warn | `"license,coverage,breaking,leaking"` | | upload_coverage | boolean | Whether to upload the coverage to [coveralls](https://coveralls.io/) | `true` | | coverage_web | boolean | Whether to run `dart test -p chrome` for coverage | `false` | -| use-flutter | boolean | Whether to setup Flutter in this workflow | `false` | | ignore_license | List of globs | | `"**.g.dart"` | | ignore_coverage | List of globs | Which files to ignore for the license check | `"**.mock.dart,**.g.dart"` | | ignore_packages | List of globs | Which packages to ignore | `"pkgs/helper_package"` | diff --git a/pkgs/firehose/bin/firehose.dart b/pkgs/firehose/bin/firehose.dart index 82bb7ddd..e2245775 100644 --- a/pkgs/firehose/bin/firehose.dart +++ b/pkgs/firehose/bin/firehose.dart @@ -11,7 +11,6 @@ import 'package:glob/glob.dart'; const helpFlag = 'help'; const validateFlag = 'validate'; const publishFlag = 'publish'; -const useFlutterFlag = 'use-flutter'; void main(List arguments) async { var argParser = _createArgs(); @@ -25,7 +24,6 @@ void main(List arguments) async { final validate = argResults[validateFlag] as bool; final publish = argResults[publishFlag] as bool; - final useFlutter = argResults[useFlutterFlag] as bool; final ignoredPackages = (argResults['ignore-packages'] as List) .where((pattern) => pattern.isNotEmpty) .map((pattern) => Glob(pattern, recursive: true)) @@ -45,7 +43,7 @@ void main(List arguments) async { exit(1); } - final firehose = Firehose(Directory.current, useFlutter, ignoredPackages); + final firehose = Firehose(Directory.current, ignoredPackages); if (validate) { await firehose.validate(); @@ -88,11 +86,6 @@ ArgParser _createArgs() { negatable: false, help: 'Publish any changed packages.', ) - ..addFlag( - useFlutterFlag, - negatable: true, - help: 'Whether this is a Flutter project.', - ) ..addMultiOption( 'ignore-packages', help: 'Which packages to ignore.', diff --git a/pkgs/firehose/lib/firehose.dart b/pkgs/firehose/lib/firehose.dart index 618dbb6f..3f9fdfa5 100644 --- a/pkgs/firehose/lib/firehose.dart +++ b/pkgs/firehose/lib/firehose.dart @@ -29,10 +29,9 @@ const String _ignoreWarningsLabel = 'publish-ignore-warnings'; class Firehose { final Directory directory; - final bool useFlutter; final List ignoredPackages; - Firehose(this.directory, this.useFlutter, this.ignoredPackages); + Firehose(this.directory, this.ignoredPackages); /// Validate the packages in the repository. /// @@ -273,14 +272,8 @@ Saving existing comment id $existingCommentId to file ${idFile.path}'''); required bool dryRun, required bool force, }) async { - String command; - if (useFlutter) { - command = 'flutter'; - } else { - command = 'dart'; - } return await runCommand( - command, + 'flutter', args: [ 'pub', 'publish', diff --git a/pkgs/firehose/lib/src/health/health.dart b/pkgs/firehose/lib/src/health/health.dart index e0cc3b07..1a18fd2b 100644 --- a/pkgs/firehose/lib/src/health/health.dart +++ b/pkgs/firehose/lib/src/health/health.dart @@ -129,9 +129,7 @@ class Health { }; Future validateCheck() async { - //TODO: Add Flutter support for PR health checks - var results = - await Firehose(directory, false, ignoredPackages).verify(github); + var results = await Firehose(directory, ignoredPackages).verify(github); var markdownTable = ''' | Package | Version | Status | diff --git a/pkgs/firehose/pubspec.yaml b/pkgs/firehose/pubspec.yaml index d9a079a2..9840560a 100644 --- a/pkgs/firehose/pubspec.yaml +++ b/pkgs/firehose/pubspec.yaml @@ -1,6 +1,6 @@ name: firehose description: A tool to automate publishing of Pub packages from GitHub actions. -version: 0.9.1 +version: 0.10.0 repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose environment: