Skip to content

Commit d771848

Browse files
authored
fix: only publish crates on tag pushes (#43)
Prevents race condition where main branch push publishes crates before the tag-triggered workflow runs, causing the tag workflow to fail with 'crate already exists' error.
1 parent 8d43305 commit d771848

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ jobs:
112112
retention-days: 1
113113

114114
publish-crates:
115-
if: github.repository == 'pulseengine/wsc'
115+
# Only publish on tag pushes to prevent race condition with main branch
116+
if: github.repository == 'pulseengine/wsc' && github.ref_type == 'tag'
116117
name: Publish Rust Crates
117118
runs-on: ubuntu-latest
118119
permissions:

0 commit comments

Comments
 (0)