fix(ci): improve addon package assembly reliability
All checks were successful
Build and Release Addon / Create Release (push) Successful in 0s
Build and Release Addon / Build Host (Linux x64) (push) Successful in 14s
Build and Release Addon / Build Host (Windows x64) (push) Successful in 7h59m53s
Build and Release Addon / Build Host (macOS arm64) (push) Successful in 41s
Build and Release Addon / Build Host (macOS x64) (push) Successful in 39s
Build and Release Addon / Package Addon (push) Successful in 24s

Switch from release API asset download to tag-based download URLs for host packages, which is more reliable and doesn't require release ID lookup. Add download verification to fail fast if files are missing.

Remove silent failure flags (2>/dev/null || true) when copying required directories - now fails explicitly if renderer or shared directories are missing.

Add package contents listing to verify successful assembly before upload.
This commit is contained in:
2026-01-28 03:16:21 -05:00
parent 2f99c6fb0b
commit d1cf4037d9

View File

@@ -199,12 +199,12 @@ jobs:
- name: Download All Host Packages
run: |
RELEASE_ID="${{ needs.create-release.outputs.release_id }}"
TAG="${{ github.ref_name }}"
VERSION="${{ needs.create-release.outputs.version }}"
mkdir -p hosts
# Download each host package
# Download each host package using tag-based download URL
for platform in win-x64 linux-x64 darwin-x64 darwin-arm64; do
if [ "$platform" = "win-x64" ]; then
EXT="zip"
@@ -212,10 +212,17 @@ jobs:
EXT="tar.gz"
fi
echo "Downloading host for $platform..."
curl -L -o "hosts/myfirst-addon-host-$platform-$VERSION.$EXT" \
FILE="myfirst-addon-host-$platform-$VERSION.$EXT"
echo "Downloading $FILE..."
curl -L -o "hosts/$FILE" \
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/$RELEASE_ID/assets/myfirst-addon-host-$platform-$VERSION.$EXT"
"${{ github.server_url }}/${{ github.repository }}/releases/download/$TAG/$FILE"
# Verify download
if [ ! -s "hosts/$FILE" ]; then
echo "ERROR: Failed to download $FILE"
exit 1
fi
done
ls -la hosts/
@@ -227,13 +234,16 @@ jobs:
mkdir -p package-base
cp addon.json package-base/
cp -r main package-base/
cp -r renderer package-base/ 2>/dev/null || true
cp -r renderer package-base/
cp -r shared package-base/
cp -r views package-base/
cp -r shared package-base/ 2>/dev/null || true
cd package-base
zip -r ../myfirst-addon-base-$VERSION.gcaddon .
echo "Base package contents:"
find . -type f | head -30
- name: Create Full Package (all platforms)
run: |
VERSION="${{ needs.create-release.outputs.version }}"
@@ -241,9 +251,9 @@ jobs:
mkdir -p package-full/host
cp addon.json package-full/
cp -r main package-full/
cp -r renderer package-full/ 2>/dev/null || true
cp -r renderer package-full/
cp -r shared package-full/
cp -r views package-full/
cp -r shared package-full/ 2>/dev/null || true
# Extract all hosts
cd hosts
@@ -267,6 +277,9 @@ jobs:
cd ../package-full
zip -r ../myfirst-addon-full-$VERSION.gcaddon .
echo "Full package contents:"
find . -type f | head -50
- name: Upload Packages
run: |
RELEASE_ID="${{ needs.create-release.outputs.release_id }}"