fix: sync release.yml with sample-plugin patterns - #537
Conversation
Without full git history, PSR cannot resolve prior release tags and fails with "fatal: Could not parse object" (exit code 128). Fixes: https://github.com/openedx/xblock-sdk/actions/runs/32739600996 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add vcs_release: "false" to PSR action so we control GitHub release creation - Add "Create GitHub Release with Assets" step using gh release create with printf '%s' for safe release notes handling via RUNNER_TEMP - Use outputs.tag instead of manually prefixing version with 'v' - Add released || 'false' fallback on job outputs - Add if-no-files-found: error on upload-artifact step - Follow Category | Action step naming convention - Add github.ref_name to concurrency group - Add publish_to_pypi if condition guard on github.ref_name == 'master' - Pin pypa/gh-action-pypi-publish to SHA dc37677 (v1.14.2) with OIDC auth Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Thanks for the pull request, @salman2013! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
| - name: Action | Semantic Version Release | ||
| id: release | ||
| # Adjust tag with desired version if applicable. | ||
| uses: python-semantic-release/python-semantic-release@39dd2052f2ce8282a5d932c31d58a2ca06d2550e # v10.6.1 |
There was a problem hiding this comment.
This correctly fixes the immutable-releases problem (matches the proven sample-plugin/event-tracking pattern), but there's a live, separate issue this doesn't address: GitPython 3.1.60 (uploaded 2026-08-25T18:33:44Z) removed Actor.name_email_regex, which PSR's config loader reads unconditionally. PSR's action builds its own Docker image fresh on every run and pins gitpython~=3.0 (unbounded), so any fresh build now crashes at config-load, before the release logic even runs -- regardless of which PSR version is pinned. Still open upstream: python-semantic-release/python-semantic-release#1476, fix in #1477 not merged/released.
We hit this for real on openedx/event-tracking and fixed it by running PSR via uv instead of the Docker action (pinning gitpython<3.1.60) and switching build_command to uv build (uv's ephemeral venvs don't bundle pip). See event-tracking#435/#436 for the exact diff -- happy to open the same fix here if useful.
- Add ref_name to concurrency group - Rename steps to Category | Action convention - Update git committer name/email - Add vcs_release: false to let workflow handle GH release creation - Add "Create GitHub Release with Assets" step using gh CLI - Add if-no-files-found: error to artifact upload - Add fallback || 'false' to released output Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
vcs_release: "false"to PSR action and add "Create GitHub Release with Assets" step usinggh release createwithprintf '%s'for safe release notes handlingoutputs.taginstead of manually prefixing version withv, addreleased || 'false'fallback, and followCategory | Actionstep naming convention from sample-pluginpypa/gh-action-pypi-publishto SHAdc37677(v1.14.2) with OIDC auth (no token/password)Test plan
masterPYPI_UPLOAD_TOKENsecret needed)🤖 Generated with Claude Code