We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1172332 commit 5a5c8c8Copy full SHA for 5a5c8c8
.github/workflows/publish.yml
@@ -201,7 +201,15 @@ jobs:
201
202
- name: Publish crate
203
run: |
204
- cargo publish
+ # Extract version from Cargo.toml
205
+ VERSION=$(grep -m 1 '^version' Cargo.toml | sed 's/.*"\(.*\)".*/\1/')
206
+
207
+ # Check if version already exists
208
+ if cargo search cddl --limit 1 | grep -q "cddl = \"$VERSION\""; then
209
+ echo "Version $VERSION already exists on crates.io, skipping publish"
210
+ else
211
+ cargo publish
212
+ fi
213
214
publish-website:
215
name: Publish website
0 commit comments