feat: enhance publish step to handle already uploaded versions

This commit is contained in:
Manuel Raimann
2026-01-30 18:31:54 +01:00
committed by Manuel
parent 6912cc83d9
commit 6a8a938b6e
+9 -2
View File
@@ -275,7 +275,14 @@ jobs:
fi
- name: Publish
if: steps.check.outputs.skip == 'false' && github.ref == 'refs/heads/master'
run: cargo publish
if: steps.check.outputs.skip == 'false'
run: |
cargo publish 2>&1 | tee publish_output.txt || {
if grep -q "already uploaded" publish_output.txt; then
echo "Version already published, skipping"
exit 0
fi
exit 1
}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}