Skip to content

Commit 1446a58

Browse files
authored
release: draft the Release until assets are verified, so latest never points at nothing (#2)
1 parent 9cabc9d commit 1446a58

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
gh release create "${GITHUB_REF_NAME}" \
3737
--repo "${GITHUB_REPOSITORY}" \
3838
--title "busbar-hashicorp-vault ${GITHUB_REF_NAME}" \
39+
--draft \
3940
--verify-tag --generate-notes \
4041
|| gh release view "${GITHUB_REF_NAME}" --repo "${GITHUB_REPOSITORY}"
4142
@@ -175,3 +176,9 @@ jobs:
175176
"delete this tag+release, and re-cut." >&2
176177
exit 1
177178
fi
179+
# Only now, with assets provably attached, does this stop being a draft and become
180+
# the release that `releases/latest` resolves to.
181+
gh release edit "${GITHUB_REF_NAME}" \
182+
--repo "${GITHUB_REPOSITORY}" \
183+
--draft=false --latest
184+
echo "::notice::Published ${GITHUB_REF_NAME} with ${count} asset(s)."

0 commit comments

Comments
 (0)