fix AUR release?

This commit is contained in:
lone-cloud 2025-09-25 02:28:40 -07:00
parent 198b38ae63
commit 06607109c4
2 changed files with 129 additions and 168 deletions

View file

@ -121,37 +121,9 @@ jobs:
fi fi
done done
# Download desktop file with retry # Use local files from the repository (already checked out)
for attempt in $(seq 1 $max_attempts); do echo "✅ Using local desktop file from assets/"
echo "Attempt $attempt: Downloading desktop file..." echo "✅ Using local LICENSE file from repository root"
if curl -L -o "gerbil.desktop" "https://github.com/lone-cloud/gerbil/releases/download/${{ inputs.tag }}/gerbil.desktop"; then
echo "✅ Desktop file downloaded successfully"
break
else
echo "❌ Desktop file download failed, waiting 10 seconds..."
sleep 10
if [ $attempt -eq $max_attempts ]; then
echo "❌ Failed to download desktop file after $max_attempts attempts"
exit 1
fi
fi
done
# Download license file with retry
for attempt in $(seq 1 $max_attempts); do
echo "Attempt $attempt: Downloading license file..."
if curl -L -o "LICENSE" "https://github.com/lone-cloud/gerbil/releases/download/${{ inputs.tag }}/LICENSE"; then
echo "✅ License file downloaded successfully"
break
else
echo "❌ License file download failed, waiting 10 seconds..."
sleep 10
if [ $attempt -eq $max_attempts ]; then
echo "❌ Failed to download license file after $max_attempts attempts"
exit 1
fi
fi
done
# Verify file sizes # Verify file sizes
appimage_size=$(stat -c%s "gerbil-${{ steps.release_info.outputs.version }}.AppImage") appimage_size=$(stat -c%s "gerbil-${{ steps.release_info.outputs.version }}.AppImage")
@ -162,7 +134,7 @@ jobs:
fi fi
SHA256_APPIMAGE=$(sha256sum "gerbil-${{ steps.release_info.outputs.version }}.AppImage" | cut -d' ' -f1) SHA256_APPIMAGE=$(sha256sum "gerbil-${{ steps.release_info.outputs.version }}.AppImage" | cut -d' ' -f1)
SHA256_DESKTOP=$(sha256sum "gerbil.desktop" | cut -d' ' -f1) SHA256_DESKTOP=$(sha256sum "assets/gerbil.desktop" | cut -d' ' -f1)
SHA256_LICENSE=$(sha256sum "LICENSE" | cut -d' ' -f1) SHA256_LICENSE=$(sha256sum "LICENSE" | cut -d' ' -f1)
echo "sha256_appimage=$SHA256_APPIMAGE" >> $GITHUB_OUTPUT echo "sha256_appimage=$SHA256_APPIMAGE" >> $GITHUB_OUTPUT
@ -189,12 +161,8 @@ optdepends=('alsa-lib: Audio support for sound effects'
'libxss: Screen saver detection support') 'libxss: Screen saver detection support')
provides=('gerbil') provides=('gerbil')
conflicts=('gerbil-git') conflicts=('gerbil-git')
source=("gerbil-${pkgver}.AppImage::${{ steps.release_info.outputs.appimage_url }}" source=("gerbil-${pkgver}.AppImage::${{ steps.release_info.outputs.appimage_url }}")
"gerbil.desktop::https://github.com/lone-cloud/gerbil/releases/download/${{ steps.release_info.outputs.tag }}/gerbil.desktop" sha256sums=('${{ steps.sha_calc.outputs.sha256_appimage }}')
"LICENSE::https://github.com/lone-cloud/gerbil/releases/download/${{ steps.release_info.outputs.tag }}/LICENSE")
sha256sums=('${{ steps.sha_calc.outputs.sha256_appimage }}'
'${{ steps.sha_calc.outputs.sha256_desktop }}'
'${{ steps.sha_calc.outputs.sha256_license }}')
prepare() { prepare() {
chmod +x "gerbil-${pkgver}.AppImage" chmod +x "gerbil-${pkgver}.AppImage"
@ -206,14 +174,12 @@ package() {
install -dm755 "${pkgdir}/opt/gerbil" install -dm755 "${pkgdir}/opt/gerbil"
cp -r squashfs-root/* "${pkgdir}/opt/gerbil/" cp -r squashfs-root/* "${pkgdir}/opt/gerbil/"
# Rename main binary to lowercase for consistency
if [ -f "${pkgdir}/opt/gerbil/Gerbil" ]; then
mv "${pkgdir}/opt/gerbil/Gerbil" "${pkgdir}/opt/gerbil/gerbil"
fi
# Fix permissions on extracted files # Fix permissions on extracted files
chmod -R 755 "${pkgdir}/opt/gerbil/" chmod -R 755 "${pkgdir}/opt/gerbil/"
# Rename the main executable to lowercase
mv "${pkgdir}/opt/gerbil/Gerbil" "${pkgdir}/opt/gerbil/gerbil"
# Create executable wrapper # Create executable wrapper
install -dm755 "${pkgdir}/usr/bin" install -dm755 "${pkgdir}/usr/bin"
cat > "${pkgdir}/usr/bin/gerbil" << 'WRAPPER' cat > "${pkgdir}/usr/bin/gerbil" << 'WRAPPER'
@ -225,8 +191,8 @@ WRAPPER
# Install desktop file and license # Install desktop file and license
install -dm755 "${pkgdir}/usr/share/applications" install -dm755 "${pkgdir}/usr/share/applications"
install -dm755 "${pkgdir}/usr/share/licenses/gerbil" install -dm755 "${pkgdir}/usr/share/licenses/gerbil"
cp "${srcdir}/gerbil.desktop" "${pkgdir}/usr/share/applications/" install -m644 "${startdir}/gerbil.desktop" "${pkgdir}/usr/share/applications/"
cp "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/gerbil/" install -m644 "${startdir}/LICENSE" "${pkgdir}/usr/share/licenses/gerbil/"
# Install icon to hicolor theme directory and pixmaps as fallback # Install icon to hicolor theme directory and pixmaps as fallback
install -dm755 "${pkgdir}/usr/share/icons/hicolor/512x512/apps" install -dm755 "${pkgdir}/usr/share/icons/hicolor/512x512/apps"
@ -325,15 +291,18 @@ EOF
provides = gerbil provides = gerbil
conflicts = gerbil-git conflicts = gerbil-git
source = gerbil-${{ steps.release_info.outputs.version }}.AppImage::${{ steps.release_info.outputs.appimage_url }} source = gerbil-${{ steps.release_info.outputs.version }}.AppImage::${{ steps.release_info.outputs.appimage_url }}
source = gerbil.desktop::https://github.com/lone-cloud/gerbil/releases/download/${{ steps.release_info.outputs.tag }}/gerbil.desktop
source = LICENSE::https://github.com/lone-cloud/gerbil/releases/download/${{ steps.release_info.outputs.tag }}/LICENSE
sha256sums = ${{ steps.sha_calc.outputs.sha256_appimage }} sha256sums = ${{ steps.sha_calc.outputs.sha256_appimage }}
sha256sums = ${{ steps.sha_calc.outputs.sha256_desktop }}
sha256sums = ${{ steps.sha_calc.outputs.sha256_license }}
pkgname = gerbil pkgname = gerbil
EOF EOF
- name: Prepare local files for AUR package
run: |
# Copy local files so they're available during PKGBUILD execution
cp "assets/gerbil.desktop" ./
cp "LICENSE" ./
echo "✅ Local files prepared for AUR package"
- name: Publish to AUR - name: Publish to AUR
uses: KSXGitHub/github-actions-deploy-aur@v2.7.2 uses: KSXGitHub/github-actions-deploy-aur@v2.7.2
with: with:

View file

@ -182,14 +182,6 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload additional assets for AUR
run: |
# Upload desktop file and LICENSE as release assets for AUR consistency
gh release upload ${{ steps.tag.outputs.tag }} "assets/gerbil.desktop" --clobber
gh release upload ${{ steps.tag.outputs.tag }} "LICENSE" --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
aur-release: aur-release:
needs: release needs: release
if: needs.release.outputs.is_prerelease != 'true' if: needs.release.outputs.is_prerelease != 'true'