Skip to content

[publish] Add bundled-files input to stage non-git files into the package archive - #213

Draft
mosuem wants to merge 1 commit into
publish-verify-archive-digestfrom
publish-bundled-files
Draft

mosuem wants to merge 1 commit into
publish-verify-archive-digestfrom
publish-bundled-files

Conversation

@mosuem

@mosuem mosuem commented Nov 13, 2026

Copy link
Copy Markdown
Member

Note

This PR was generated by an AI coding agent (Jetski) on behalf of @mosuem.

Stacked on #212 (and #210).

Adds an optional bundled-files input to .github/workflows/publish.yml so packages that ship prebuilt native assets in their pub.dev archive (such as package:boring in dart-lang/tools#2866) can reuse publish.yml with SLSA Build L3 provenance instead of maintaining a bespoke publishing workflow.

How it works

When bundled-files is non-empty, both validate (before dart pub publish --dry-run) and package (on a fresh checkout before unshare -n dart pub publish --to-archive):

  1. Download all bundled-files-* workflow artifacts from preceding jobs in the same workflow run (merge-multiple: false).
  2. Validate every listed relative path:
    • stays strictly inside working-directory (rejecting absolute paths, .., and symlinks);
    • does not overwrite any git ls-files-tracked file or existing file in the checkout.
  3. Enforce a strict bijection between bundled-files and the files across bundled-files-* artifacts: fails if any listed file is missing, if any unlisted file was uploaded, or if two artifacts provide the same path.
  4. After dart pub publish --to-archive, verify that every listed file is actually present in package.tar.gz (catching .gitignore / .pubignore mistakes early).

@devoncarew

Copy link
Copy Markdown
Contributor

It looks like this will conflict with #207; the bundled-files staging here (in both validate and package) uses inputs.working-directory directly, so with pkgs/{package} it would stage into the literal unexpanded path.

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.

2 participants