···3737 export REPO_URL="at://${TANGLED_REPO_DID}/sh.tangled.repo/${REPO_RKEY}"
3838 export APP_PASSWORD="${PUBLISH_APP_PASSWORD}"
39394040+ # Log in once here so parallel publish-artifact.sh invocations share the
4141+ # same session file instead of racing on goat's auth-session.json.
4242+ goat account login -u "${TANGLED_REPO_DID}" -p "${APP_PASSWORD}"
4343+4044 goreleaser release --clean
···11#!/usr/bin/env bash
22set -e
3344-# Serialize across parallel invocations from goreleaser. goat stores its session
55-# in a single file (~/.local/state/goat/auth-session.json), so concurrent logins
66-# race on it, and the PDS gets slammed by simultaneous uploads.
44+# Serialize across parallel invocations from goreleaser to avoid slamming the
55+# PDS with simultaneous uploads. `goat account login` happens once in the
66+# release workflow before goreleaser runs, so this script just reuses the
77+# existing session.
78exec 9>/tmp/atcr-publish-artifact.lock
89flock 9
910···1819 attempt=$((attempt + 1))
1920 done
2021}
2121-2222-retry goat account login -u "${TANGLED_REPO_DID}" -p "${APP_PASSWORD}"
23222423TAG_HASH=$(git rev-parse "$TANGLED_REF_NAME")
2524TAG_BYTES=$(printf "$(printf '%s' "$TAG_HASH" | sed 's/../\\x&/g')" | base64 | tr -d '=')