Add reusable GitHub release plumbing - #4167
Conversation
Add explicit release-note and existing-release policies, release prerequisites, and reusable GitHub build provenance attestations while preserving VmgsTool release behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4fe65aa5-d620-4856-a525-e32bf98c16b1
There was a problem hiding this comment.
Pull request overview
Adds reusable Flowey primitives for publishing GitHub releases and generating GitHub build provenance attestations, intended to support the upcoming standalone OpenVMM source release workflow.
Changes:
- Extend
publish_gh_releasewith explicit release-notes handling, configurable existing-release behavior, and prerequisite side-effects before publication. - Update the VmgsTool GH release job to supply explicit release notes and “skip if exists” behavior.
- Add a reusable
actions/attest@v4Flowey node for build provenance attestation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| flowey/flowey_lib_hvlite/src/_jobs/publish_vmgstool_gh_release.rs | Supplies explicit release notes and existing-release handling for the VmgsTool release job. |
| flowey/flowey_lib_common/src/publish_gh_release.rs | Adds reusable GH release publication parameters (notes, on-existing behavior, prerequisites) and improves “release missing vs auth/server failure” handling. |
| flowey/flowey_lib_common/src/lib.rs | Exposes the new attestation module from flowey_lib_common. |
| flowey/flowey_lib_common/src/attest_build_provenance.rs | Introduces a reusable GitHub Actions attestation node using actions/attest@v4. |
Keep GitHub release existence checks under the same command wrappers and environment as release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4fe65aa5-d620-4856-a525-e32bf98c16b1
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
flowey/flowey_lib_common/src/attest_build_provenance.rs:37
actions/attest@v4’s upstream README listsartifact-metadata: writeas a required permission for normal usage. This node currently requestscontents: read(and does not requestartifact-metadataat all), which can cause the generated workflow to fail at runtime with an insufficient-permissions error when creating attestation storage records.
Consider extending GhPermission to include artifact-metadata and requesting it here (or otherwise ensuring callers can grant it) so the node’s emitted step is self-sufficient.
ctx.emit_gh_step("Attest release artifacts", "actions/attest@v4")
.with("subject-path", subject_paths)
.requires_permission(GhPermission::Contents, GhPermissionValue::Read)
.requires_permission(GhPermission::IdToken, GhPermissionValue::Write)
.requires_permission(GhPermission::Attestations, GhPermissionValue::Write)
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
flowey/flowey_lib_common/src/attest_build_provenance.rs:34
actions/attestis referenced via a floating major tag (actions/attest@v4). Elsewhere in this repo, GitHub Actions are pinned to immutable SHAs (e.g.actions/setup-node@49933e…inflowey_lib_common/src/install_nodejs.rsandactions/checkout@…in workflows) to reduce supply-chain risk. Consider pinningactions/attestto a specific commit SHA (with an inline comment indicating the corresponding version) and updating it intentionally when bumping versions.
let attested = if matches!(ctx.backend(), FlowBackend::Github) {
ctx.emit_gh_step("Attest release artifacts", "actions/attest@v4")
.with("subject-path", subject_paths)
Add the artifact-metadata GitHub permission to Flowey and request write access for actions/attest@v4. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4fe65aa5-d620-4856-a525-e32bf98c16b1
Adds the reusable release-publication primitives needed by the standalone OpenVMM source release described in #4150.
ghauthentication or server failuresactions/attest@v4Flowey nodeTODOnotes, and skip-existing behaviorThis is independent of the build identity work in #4162 and does not yet add the OpenVMM publication workflow.