Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/release-authorize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ jobs:
with:
ref: main
fetch-depth: 0
# The tag has to arrive with this checkout, because the checkout is the
# only step here that is authenticated. A later `git fetch` runs against
# an origin with no credentials: a public caller is served anonymously,
# a private one is asked for a username and the job dies.
fetch-tags: true
persist-credentials: false

- name: Resolve and verify the reviewed signed tag
Expand All @@ -64,7 +69,11 @@ jobs:
exit 1
fi

git fetch --force origin "refs/tags/${TAG}:refs/tags/${TAG}"
if ! git rev-parse -q --verify "refs/tags/${TAG}" >/dev/null; then
echo "::error::Release tag '${TAG}' was not fetched with the checkout." \
"Push the tag before dispatching the release."
exit 1
fi
if [ "$(git cat-file -t "refs/tags/${TAG}")" != tag ]; then
echo "::error::Release tag '${TAG}' must be an annotated tag object."
exit 1
Expand Down