ci: fix GHCR probe and require explicit release tag upload

This commit is contained in:
CJACK
2026-02-23 01:57:52 +08:00
parent cf2f79b6f4
commit 3c66ab958a

View File

@@ -156,9 +156,19 @@ jobs:
set -euo pipefail
(cd dist && sha256sum *.tar.gz *.zip > sha256sums.txt)
- name: Validate release tag
run: |
set -euo pipefail
TAG="${{ github.event.release.tag_name }}"
if [ -z "${TAG}" ]; then
echo "release.tag_name is empty; this workflow must run from a published GitHub Release." >&2
exit 1
fi
- name: Upload Release Assets
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.release.tag_name }}
files: |
dist/*.tar.gz
dist/*.zip