build: align release workflow with sample-plugin standard - #77
Conversation
Attach release assets via a draft `gh release create` instead of python-semantic-release/publish-action, which fails with HTTP 422 once immutable releases freeze a published release's assets. Set vcs_release: "false" so semantic-release builds and tags but leaves GitHub Release creation to us, guaranteeing dists attach before publish. Also bump python-semantic-release to v10.6.2 and pin gh-action-pypi-publish. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #77 +/- ##
=======================================
Coverage 82.17% 82.17%
=======================================
Files 48 48
Lines 1419 1419
Branches 110 110
=======================================
Hits 1166 1166
Misses 221 221
Partials 32 32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Minor: this step is named `Create GitHub Release with Assets`, missing the `Publish | ` prefix that sample-plugin, and your own xblocks-core#297/forum#290 PRs, all use for the same step (`Publish | Create GitHub Release with Assets`). Otherwise matches sample-plugin's pattern exactly. |
|
Since this repo is already uv-native ( Avoids pip entirely (in line with the org's uv migration) and is ~2.5-3x faster per run in our testing — PSR's Docker image rebuilds from scratch every run (~40s overhead) vs |
What changed
Updates
.github/workflows/release.ymlto match the current sample-plugin release standard, as established in openedx/sample-plugin#57.Why
The openedx org now has GitHub immutable releases enabled, which freezes a release's assets the moment it is published. Our flow (like sample-plugin's before #57) published the release first and then attached the distributions in a separate
python-semantic-release/publish-actionstep — which GitHub now rejects with HTTP 422 (Cannot upload assets to an immutable release).In sample-plugin this silently produced asset-less releases from v3.6.1 onward, and started hard-failing the release job once python-semantic-release v10.6.0+ stopped swallowing the upload error. This repo runs the same flow and would hit the identical failure.
What sample-plugin#57 did (and this PR mirrors)
vcs_release: "false"on thepython-semantic-releasestep — it still commits, tags, pushes and builds, but no longer creates the GitHub Release itself.publish-actionis replaced by agh release createstep that creates the release as a draft, uploads thedist/*assets, and only then publishes it — the sequence immutable releases require. PSR's generated notes are reused via therelease_notesoutput so the release body is unchanged.Adaptations for this repo:
python-semantic-releasev10.6.1 → v10.6.2.pypa/gh-action-pypi-publishto a commit SHA (v1.14.2) instead of the floatingrelease/v1tag. OIDC trusted publishing is preserved (no API token).Notes
Draft PR — the release workflow only runs on merge to
main, so end-to-end behaviour can't be exercised on the branch (same caveat as #57, which validated itself by releasing on merge).🤖 Generated with Claude Code