diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 981cb18..bd3e7e7 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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 }}"