Skip to content

Commit f84a307

Browse files
authored
gh-430: fix for release action (#429)
1 parent 0dd2fb9 commit f84a307

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
uses: actions/checkout@v4
2323

2424
- name: Replace stable version with the release version
25+
if: github.event_name == 'release' && github.event.action == 'published'
2526
run: |-
2627
# store the release tag
2728
tag="${{ github.ref_name }}"
@@ -36,6 +37,9 @@ jobs:
3637
--expression "$url_pattern" \
3738
${{ github.workspace }}/README.md
3839
40+
# store the tag since the git checkout is now dirty
41+
echo "SETUPTOOLS_SCM_PRETEND_VERSION=${tag}" >> $GITHUB_ENV
42+
3943
- name: Build SDist and wheel
4044
run: pipx run build
4145

0 commit comments

Comments
 (0)