resolve annotated tags to their commit in the release workflow
131 unmodified linesExpand all13213313413513613713813914014114214314414537 unmodified lines131 unmodified linesExpand all**Giving up on waiting is not cancelling.** If the poll loop hits itsdeadline the release continues server-side. Treat it as *unknown* and readthe Update before re-running, because a blind retry redeploys.
**`TANGLED_SHA` on a tag push is the ref's sha, not the commit's.** For anannotated tag (`git tag -a`) the ref is a tag object, so pinning a build toit finds nothing and the mirror check 422s. The workflow resolves`HEAD^{commit}` from the clone instead, which is right for annotated andlightweight tags alike.
**Tag pushes do not run `test.yml`** — it triggers on `branch: [main]`, anda tag push has no branch. Spindle has no cross-workflow `needs:`, so a tagis assumed to point at a commit that already went green on main.
37 unmodified lines36 unmodified lines3738394041424341424344454647484950515253545559 unmodified lines36 unmodified lines echo "suffix like -rc1 has nowhere to go." >&2 exit 1 fi
printf '%s' "$version" > /tmp/wisp-version printf '%s' "$TANGLED_SHA" > /tmp/wisp-commit echo "releasing $version from $TANGLED_SHA" # NOT $TANGLED_SHA. On a tag push that is the sha of the *ref*, and for # an annotated tag (`git tag -a`) the ref is a tag object, not a # commit — the mirror check then 422s and a build pinned to it would # find nothing. The clone is of the tag, so HEAD is the commit it # points at, for both annotated and lightweight tags. commit="$(git rev-parse 'HEAD^{commit}')"
printf '%s' "$version" > /tmp/wisp-version printf '%s' "$commit" > /tmp/wisp-commit echo "releasing $version from $commit (ref $TANGLED_SHA)"
- name: verify commit reached the mirror command: | export PATH="$HOME/.nix-profile/bin:$PATH" set -euo pipefail59 unmodified lines