Skip to content

Commit 77b7c59

Browse files
fix: run PSR via uv to work around upstream GitPython break
python-semantic-release's GitHub Action builds its own Docker image fresh on every run and pins gitpython~=3.0 (unbounded). GitPython 3.1.60 (2026-08-25) removed Actor.name_email_regex, which PSR's config loader reads unconditionally, so every fresh build of the action's image fails with AttributeError -- confirmed on this repo's last release attempt. See python-semantic-release/python-semantic-release#1476, open, no fix released yet. Runs the same PSR version via uv instead, pinning gitpython below the break. Verified locally in --noop mode.
1 parent df86ef9 commit 77b7c59

1 file changed

Lines changed: 22 additions & 10 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,30 @@ jobs:
2929

3030
- run: git reset --hard ${{ github.sha }}
3131

32+
- name: Install uv
33+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
34+
35+
# python-semantic-release/python-semantic-release's GitHub Action builds
36+
# its own Docker image fresh on every run and pins gitpython~=3.0
37+
# (unbounded), so it always installs the latest 3.x release. GitPython
38+
# 3.1.60 (2026-08-25) removed `Actor.name_email_regex`, which PSR's own
39+
# config loader still reads unconditionally -- breaking every fresh build
40+
# of the action's image, regardless of which PSR version/SHA is pinned.
41+
# See python-semantic-release/python-semantic-release#1476 (open, no fix
42+
# released yet). Workaround: run the same PSR version ourselves via uv,
43+
# where we can pin gitpython below the break. Safe to revert to the
44+
# `uses: python-semantic-release/python-semantic-release@...` action once
45+
# upstream ships a fix.
3246
- name: Python Semantic Release
3347
id: release
34-
uses: python-semantic-release/[email protected]
35-
with:
36-
github_token: ${{ secrets.OPENEDX_SEMANTIC_RELEASE_GITHUB_TOKEN }}
37-
git_committer_name: "github-actions"
38-
git_committer_email: "[email protected]"
39-
changelog: "false"
40-
# Commit, tag, push and build, but don't create the GitHub release.
41-
# We create it ourselves in the next step so that the distributions
42-
# are attached before the release is published. See that step for why.
43-
vcs_release: "false"
48+
env:
49+
GH_TOKEN: ${{ secrets.OPENEDX_SEMANTIC_RELEASE_GITHUB_TOKEN }}
50+
GIT_COMMIT_AUTHOR: "github-actions <[email protected]>"
51+
run: |
52+
git config --global user.name "github-actions"
53+
git config --global user.email "[email protected]"
54+
uvx --with "gitpython<3.1.60" --from "python-semantic-release==10.6.1" \
55+
semantic-release -v version --no-changelog --no-vcs-release
4456
4557
# This repo has immutable releases enabled, which freezes a release's
4658
# assets the moment it is published, so assets cannot be attached

0 commit comments

Comments
 (0)