File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -117,18 +117,21 @@ jobs:
117117 fi
118118
119119 VERSION="${TAG#v}"
120+ SHA256_FILE="network_adapter_${TARGET}.bin.sha256"
120121
121- # Get SHA256 from release asset
122- SHA256_URL="https://github.com/${REPO}/releases/download/${TAG}/network_adapter_${TARGET}.bin.sha256"
123- SHA256=$(curl -sL "$SHA256_URL" 2>/dev/null | awk '{print $1}')
122+ # Download SHA256 file using gh CLI (handles auth properly)
123+ if gh release download "$TAG" --repo "$REPO" --pattern "$SHA256_FILE" --clobber 2>/dev/null; then
124+ SHA256=$(awk '{print $1}' "$SHA256_FILE")
125+ rm -f "$SHA256_FILE"
124126
125- if [ -n "$SHA256" ] && [ ${#SHA256} -eq 64 ]; then
126- BIN_URL="https://github.com/${REPO}/releases/download/${TAG}/network_adapter_${TARGET}.bin"
127+ if [ -n "$SHA256" ] && [ ${#SHA256} -eq 64 ]; then
128+ BIN_URL="https://github.com/${REPO}/releases/download/${TAG}/network_adapter_${TARGET}.bin"
127129
128- # Add to manifest using jq
129- jq --arg ver "$VERSION" --arg url "$BIN_URL" --arg sha "$SHA256" \
130- '.versions += [{"version": $ver, "url": $url, "sha256": $sha}]' \
131- manifest.json > tmp.json && mv tmp.json manifest.json
130+ # Add to manifest using jq
131+ jq --arg ver "$VERSION" --arg url "$BIN_URL" --arg sha "$SHA256" \
132+ '.versions += [{"version": $ver, "url": $url, "sha256": $sha}]' \
133+ manifest.json > tmp.json && mv tmp.json manifest.json
134+ fi
132135 fi
133136 done
134137
You can’t perform that action at this time.
0 commit comments