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

Use publish workflow provided by the setup-dart GHA action #184

Open
joecotton-wk opened this issue Apr 3, 2024 · 0 comments
Open

Use publish workflow provided by the setup-dart GHA action #184

joecotton-wk opened this issue Apr 3, 2024 · 0 comments

Comments

@joecotton-wk
Copy link

We should use the dart-lang/setup-dart/.github/workflows/publish.yml@v1 workflow provided by the setup-dart GHA action instead of home-rolling our own.

Something like this:

jobs:
  publish:
    name: Publish to pub.dev
    uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1

Details

Previously, we were using the publish workflow provided by the setup-dart GHA action. However, this caused our publishing workflow to fail (link):

 Package validation found the following potential issues:
* 1 checked-in file is ignored by a `.gitignore`.
  Previous versions of Pub would include those in the published package.
  
  Consider adjusting your `.gitignore` files to not ignore those files, and if you do not wish to
  publish these files use `.pubignore`. See also dart.dev/go/pubignore
  
  Files that are checked in while gitignored:
  
  test/JSON-Schema-Test-Suite/tests/latest

The origin of this error is a bug in dart publish that hasn't been addressed. Until that bug is addressed, we have to publish with the --skip-validation flag enabled, but the publish workflow from the setup-dart GHA action doesn't allow that parameter to be passed to it. Consequently, we've had to duplicate the majority of that workflow just so we can add the flag.

Once the bug is fixed and we no longer need the --skip-validation flag, we can replace the copied code with the one from setup-dart.

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

No branches or pull requests

1 participant