ci: skip crates.io publishing for prerelease tags

This commit is contained in:
2026-10-04 13:00:21 +02:00
parent 9acf650fc9
commit 946cd8e642
+4 -2
View File
@@ -124,11 +124,13 @@ jobs:
if-no-files-found: error
publish:
# Publishes the crate to crates.io on a v* tag. Trusted publishing
# Publishes the crate to crates.io on a release tag (a v* tag without
# a prerelease suffix: v0.2.0 publishes, v0.2.0-rc1 does not — release
# candidates are never published). Trusted publishing
# (OIDC) is GitHub-Actions-only, so authentication goes through a
# crates.io API token stored as the CARGO_REGISTRY_TOKEN secret,
# scoped to the pkh crate.
if: startsWith(github.ref, 'refs/tags/v')
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, '-')
needs: build
runs-on: ubuntu-latest
container: