Skip to content

ci(publish): build + publish in one job (fix BlobNotFound artifact handoff) - #1709

Merged
igorls merged 1 commit into
developfrom
ci/publish-single-job
Jun 6, 2026
Merged

ci(publish): build + publish in one job (fix BlobNotFound artifact handoff)#1709
igorls merged 1 commit into
developfrom
ci/publish-single-job

Conversation

@igorls

@igorls igorls commented Jun 6, 2026

Copy link
Copy Markdown
Member

Why

The v3.3.6 publish runs failed twice, both at the publish job's download-artifact step with BlobNotFound. The build job built mempalace-3.3.6.tar.gz+.whl and uploaded a valid 25 MB dist artifact (confirmed in the run's artifact list), but the cross-job download consistently failed — a GitHub v4 artifact-service flake. The PyPI upload step never ran, so nothing was published.

What

Collapse the two-job (build → publish) split into a single publish job that builds and publishes in the same workspace, so there's no upload/download-artifact handoff to fail. pypa/gh-action-pypi-publish reads straight from dist/.

Unchanged: pypi environment approval gate, OIDC id-token: write, the workflow_dispatch manual trigger + validated refs/tags/ checkout, and the on-main + tag == version.py checks. The PyPI trusted-publisher config keys on workflow filename + environment, not job structure, so it still matches.

Trade-off: the build now runs behind the approval gate (you approve, then it builds + publishes) instead of before it. The post-publish validation (pip install + build a palace) is unchanged.

Self-review (done before pushing)

  • Exactly one job; environment: pypi + permissions: {contents: read, id-token: write}.
  • No raw ${{ }} in any run: (inputs via env:, quoted "$TAG"); checkout ref: refs/tags/<validated-tag>.
  • Tag regex requires vMAJOR.MINOR.PATCH[-suffix] (rejects v3, main, injection).

…andoff

The two-job split passed the wheel from the build job to the publish job
via upload/download-artifact, which failed repeatedly with BlobNotFound on
the same-run download (GitHub artifact-service flake) — the PyPI upload step
never ran. Collapse into a single `publish` job that builds and publishes in
the same workspace, removing the handoff entirely. The job keeps the `pypi`
environment gate, OIDC (id-token: write), refs/tags checkout, and the
on-main + version-manifest checks.
Copilot AI review requested due to automatic review settings June 6, 2026 08:10
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the PyPI publish workflow to avoid cross-job artifact handoff failures (BlobNotFound) by performing build and publish steps within a single job, keeping the release process self-contained while still enforcing the existing tag validation and pypi environment approval gate.

Changes:

  • Collapse the prior buildpublish two-job workflow into a single publish job.
  • Remove upload-artifact / download-artifact usage so pypa/gh-action-pypi-publish reads directly from the locally built dist/.
  • Keep existing safeguards: validated refs/tags/... checkout, “tag is on main” ancestry check, and tag == mempalace/version.py check.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@igorls
igorls merged commit 939a076 into develop Jun 6, 2026
9 checks passed
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