Skip to content

Commit cce3cbf

Browse files
committed
ci: improve semantic-release cross-platform compatibility and checkout logic
1 parent b3d8296 commit cce3cbf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- name: Checkout code
2828
uses: actions/checkout@v6
2929
with:
30+
ref: ${{ github.event.workflow_run.head_branch }}
3031
fetch-depth: 0
3132
persist-credentials: false
3233

.releaserc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ plugins:
2020
- changelogFile: CHANGELOG.md
2121
- - "@semantic-release/exec"
2222
- prepareCmd: |
23-
sed -i 's/__version__ = ".*"/__version__ = "${nextRelease.version}"/' jsonpath/__init__.py
23+
python -c "import re; content = open('jsonpath/__init__.py').read(); open('jsonpath/__init__.py', 'w').write(re.sub(r'__version__ = \".*?\"', '__version__ = \"${nextRelease.version}\"', content))"
2424
uv version "${nextRelease.version}"
2525
publishCmd: uv build
2626
- - "@semantic-release/git"

0 commit comments

Comments
 (0)