Skip to content

build: align release workflow with sample-plugin standard - #77

Open
farhan wants to merge 1 commit into
mainfrom
farhan/align-release-workflow-immutable
Open

build: align release workflow with sample-plugin standard#77
farhan wants to merge 1 commit into
mainfrom
farhan/align-release-workflow-immutable

Conversation

@farhan

@farhan farhan commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What changed

Updates .github/workflows/release.yml to 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-action step — 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 the python-semantic-release step — it still commits, tags, pushes and builds, but no longer creates the GitHub Release itself.
  • publish-action is replaced by a gh release create step that creates the release as a draft, uploads the dist/* assets, and only then publishes it — the sequence immutable releases require. PSR's generated notes are reused via the release_notes output so the release body is unchanged.

Adaptations for this repo:

  • Bump python-semantic-release v10.6.1 → v10.6.2.
  • Pin pypa/gh-action-pypi-publish to a commit SHA (v1.14.2) instead of the floating release/v1 tag. 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

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

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.17%. Comparing base (a14ce68) to head (fdc7a44).

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           
Flag Coverage Δ
unittests 82.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@farhan
farhan marked this pull request as ready for review September 1, 2026 06:36
@farhan farhan self-assigned this Sep 1, 2026
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