Skip to content

[publish] Upload package provenance attestations to pub.dev - #199

Draft
mosuem wants to merge 1 commit into
publish-attest-inputfrom
publish-package-attestations
Draft

mosuem wants to merge 1 commit into
publish-attest-inputfrom
publish-package-attestations

Conversation

@mosuem

@mosuem mosuem commented Sep 1, 2026 •

Copy link
Copy Markdown
Member

Note

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

With attest: true, the publish job now downloads the attestation-bundle artifact from the attest job and passes it to dart pub publish --from-archive=… --with-attestation=….

Part 2 of 2 for package provenance signing (see go/dart-signed-packages). Stacked on #210, which adds the opt-in attest input and computes the attestation. Until #210 lands, only the top commit belongs to this PR.

Blocked on pub support

This stays a draft until pub supports attestations end to end. dart pub publish --with-attestation fails unless both of these hold:

Changes

  • publish.yml:
    • With attest: true, download attestation-bundle and pass --with-attestation="$RUNNER_TEMP/package.tar.gz.sigstore.json".
    • In test-run mode, check the downloaded bundle instead of publishing.
    • Document that attest: true also needs a repository field in pubspec.yaml. pub enforces this when publishing with an attestation.
  • CHANGELOG.md: add an entry.

Callers without attest: true publish exactly as before.

Example caller workflow

jobs:
  publish:
    permissions:
      id-token: write # Required for OIDC token minting
      attestations: write # Required for `attest: true`
    uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
    with:
      attest: true
      # working-directory: pkgs/package_name # optional, defaults to repository root

@mosuem
mosuem force-pushed the publish-package-attestations branch from f452aa9 to b42bcce Compare September 24, 2026 07:55
@mosuem mosuem changed the title [publish] Add package attestation support via two-step workflow [publish] Add package attestation support via three-job workflow Oct 7, 2026
@mosuem
mosuem changed the base branch from main to publish-three-job-workflow October 8, 2026 09:14
@mosuem
mosuem force-pushed the publish-package-attestations branch from c30400d to a2a8587 Compare October 8, 2026 09:14
@mosuem
mosuem added this pull request to stack #204 October 8, 2026 09:14
@mosuem mosuem changed the title [publish] Add package attestation support via three-job workflow [publish] Compute and pass package provenance attestations Oct 8, 2026
Base automatically changed from publish-three-job-workflow to main October 22, 2026 02:20
@mosuem
mosuem force-pushed the publish-package-attestations branch from a2a8587 to 3106072 Compare November 13, 2026 09:35
@mosuem mosuem changed the title [publish] Compute and pass package provenance attestations [publish] Upload package provenance attestations to pub.dev Nov 13, 2026
@mosuem
mosuem removed this pull request from stack #204 November 13, 2026 09:37
@mosuem
mosuem changed the base branch from main to publish-attest-input November 13, 2026 09:37
@mosuem
mosuem added this pull request to stack #211 November 13, 2026 09:37
With `attest: true`, the `publish` job downloads the `attestation-bundle`
artifact produced by the `attest` job and passes it to
`dart pub publish --from-archive=... --with-attestation=...`.

In test-run mode, the downloaded bundle is checked instead.
@mosuem
mosuem force-pushed the publish-package-attestations branch from 3106072 to 2575fbe Compare November 13, 2026 09:40
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.

1 participant