There was an error while loading. Please reload this page.
1 parent be3d5f2 commit dba54b1Copy full SHA for dba54b1
1 file changed
.github/workflows/publish-crate.yaml
@@ -65,10 +65,21 @@ jobs:
65
- name: Publish aviso-validators
66
run: |
67
set -euo pipefail
68
+ ERR_FILE="${RUNNER_TEMP}/publish-validators.err"
69
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.dry_run }}" = "true" ]; then
70
cargo publish --manifest-path aviso-validators/Cargo.toml --dry-run
71
else
- cargo publish --manifest-path aviso-validators/Cargo.toml
72
+ if cargo publish --manifest-path aviso-validators/Cargo.toml 2>"${ERR_FILE}"; then
73
+ exit 0
74
+ fi
75
+
76
+ if grep -q 'already exists on crates.io index' "${ERR_FILE}"; then
77
+ echo "aviso-validators is already published for this version; continuing."
78
79
80
81
+ cat "${ERR_FILE}" >&2
82
+ exit 1
83
fi
84
85
publish-server:
0 commit comments