Skip to content

Commit 23160bd

Browse files
committed
Merge branch 'fix_release3'
2 parents 1c64f64 + ff415b1 commit 23160bd

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/sync-extension.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,31 @@ jobs:
6565
6666
echo "📁 Downloading extension-files.tar.gz from release..."
6767
68-
# Get the download URL for extension-files.tar.gz
69-
TARBALL_URL=$(curl -s -H "Authorization: token ${{ secrets.SENTIENCE_CHROME_TOKEN }}" \
68+
# For private repos, use the API URL with asset ID, not browser_download_url
69+
ASSET_INFO=$(curl -s -H "Authorization: token ${{ secrets.SENTIENCE_CHROME_TOKEN }}" \
7070
"https://api.github.com/repos/$REPO/releases/tags/$TAG" | \
71-
jq -r '.assets[] | select(.name=="extension-files.tar.gz") | .browser_download_url')
71+
jq -r '.assets[] | select(.name=="extension-files.tar.gz") | "\(.id)|\(.url)"')
7272
73-
if [ -z "$TARBALL_URL" ] || [ "$TARBALL_URL" == "null" ]; then
73+
if [ -z "$ASSET_INFO" ] || [ "$ASSET_INFO" == "null" ]; then
7474
echo "❌ extension-files.tar.gz not found in release assets"
7575
echo "Available assets:"
7676
curl -s -H "Authorization: token ${{ secrets.SENTIENCE_CHROME_TOKEN }}" \
7777
"https://api.github.com/repos/$REPO/releases/tags/$TAG" | \
78-
jq -r '.assets[].name'
78+
jq -r '.assets[] | "\(.name) (id: \(.id))"'
7979
exit 1
8080
fi
8181
82-
echo " Downloading from: $TARBALL_URL"
83-
# Use Accept header for private repos to get the asset directly
82+
ASSET_ID=$(echo "$ASSET_INFO" | cut -d'|' -f1)
83+
ASSET_URL=$(echo "$ASSET_INFO" | cut -d'|' -f2)
84+
85+
echo " Asset ID: $ASSET_ID"
86+
echo " Downloading from API: $ASSET_URL"
87+
88+
# Download using the API URL with Accept header (required for private repos)
8489
curl -L \
8590
-H "Authorization: token ${{ secrets.SENTIENCE_CHROME_TOKEN }}" \
8691
-H "Accept: application/octet-stream" \
87-
"$TARBALL_URL" -o extension-files.tar.gz
92+
"$ASSET_URL" -o extension-files.tar.gz
8893
8994
# Verify download
9095
if [ ! -f "extension-files.tar.gz" ]; then

0 commit comments

Comments
 (0)