Skip to content

fix: sync release.yml with sample-plugin patterns - #537

Open
salman2013 wants to merge 2 commits into
openedx:masterfrom
salman2013:fix/sync-release-workflow
Open

fix: sync release.yml with sample-plugin patterns#537
salman2013 wants to merge 2 commits into
openedx:masterfrom
salman2013:fix/sync-release-workflow

Conversation

@salman2013

Copy link
Copy Markdown
Contributor

Summary

  • Add vcs_release: "false" to PSR action and add "Create GitHub Release with Assets" step using gh release create with printf '%s' for safe release notes handling
  • Use outputs.tag instead of manually prefixing version with v, add released || 'false' fallback, and follow Category | Action step naming convention from sample-plugin
  • Pin pypa/gh-action-pypi-publish to SHA dc37677 (v1.14.2) with OIDC auth (no token/password)

Test plan

  • Verify release workflow triggers correctly on push to master
  • Confirm PSR creates tag/commit but does not create GitHub release directly
  • Confirm "Create GitHub Release with Assets" step attaches dist files before publishing
  • Confirm PyPI publish uses OIDC (no PYPI_UPLOAD_TOKEN secret needed)

🤖 Generated with Claude Code

salman2013 and others added 2 commits August 25, 2026 13:28
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>
@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Aug 27, 2026
@openedx-webhooks

openedx-webhooks commented Aug 27, 2026

Copy link
Copy Markdown

Thanks for the pull request, @salman2013!

This repository is currently maintained by @openedx/axim-engineering.

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 approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where 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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions Aug 27, 2026
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Aug 27, 2026
@salman2013
salman2013 marked this pull request as ready for review August 28, 2026 09:52
@salman2013
salman2013 requested a review from farhan August 28, 2026 09:52
- 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

salman2013 added a commit to salman2013/xblock-in-video-quiz that referenced this pull request Aug 28, 2026
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Waiting on Author

Development

Successfully merging this pull request may close these issues.

4 participants