Skip to content

Commit fe5b818

Browse files
VinciGit00claude
andcommitted
fix(ci): clean stale dist artifacts before semantic-release publish
The release job restored a cached ./dist from the build job (built with the pre-bump version) and then semantic-release-pypi rebuilt the package with the new version into the same directory. Twine then attempted to upload both versions; PyPI rejected the older (deleted) filename and the whole upload aborted, leaving the new version unpublished. Wipe ./dist after restoring the cache and before semantic-release runs, so semantic-release-pypi builds and uploads only the current version. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8c0abaf commit fe5b818

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ jobs:
8181
path: ./dist
8282
key: ${{ runner.os }}-build-${{ github.sha }}
8383

84+
- name: Clean stale dist artifacts
85+
run: rm -rf ./dist/* || true
86+
8487
- name: Semantic Release
8588
uses: cycjimmy/semantic-release-action@v4.1.0
8689
with:

0 commit comments

Comments
 (0)