upload.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash -ex
  2. . .ci/scripts/common/pre-upload.sh
  3. APPIMAGE_NAME="yuzu-${GITDATE}-${GITREV}.AppImage"
  4. REV_NAME="yuzu-linux-${GITDATE}-${GITREV}"
  5. ARCHIVE_NAME="${REV_NAME}.tar.xz"
  6. COMPRESSION_FLAGS="-cJvf"
  7. if [ "${RELEASE_NAME}" = "mainline" ]; then
  8. DIR_NAME="${REV_NAME}"
  9. else
  10. DIR_NAME="${REV_NAME}_${RELEASE_NAME}"
  11. fi
  12. mkdir "$DIR_NAME"
  13. cp build/bin/yuzu-cmd "$DIR_NAME"
  14. cp build/bin/yuzu "$DIR_NAME"
  15. # Build an AppImage
  16. cd build
  17. wget -nc https://github.com/yuzu-emu/ext-linux-bin/raw/main/appimage/appimagetool-x86_64.AppImage
  18. chmod 755 appimagetool-x86_64.AppImage
  19. # if FUSE is not available, then fallback to extract and run
  20. if ! ./appimagetool-x86_64.AppImage --version; then
  21. export APPIMAGE_EXTRACT_AND_RUN=1
  22. fi
  23. if [ "${RELEASE_NAME}" = "mainline" ]; then
  24. # Generate update information if releasing to mainline
  25. ./appimagetool-x86_64.AppImage -u "gh-releases-zsync|yuzu-emu|yuzu-${RELEASE_NAME}|latest|yuzu-*.AppImage.zsync" AppDir "${APPIMAGE_NAME}"
  26. else
  27. ./appimagetool-x86_64.AppImage AppDir "${APPIMAGE_NAME}"
  28. fi
  29. cd ..
  30. # Copy the AppImage and update info to the artifacts directory and avoid compressing it
  31. cp "build/${APPIMAGE_NAME}" "${ARTIFACTS_DIR}/"
  32. if [ -f "build/${APPIMAGE_NAME}.zsync" ]; then
  33. cp "build/${APPIMAGE_NAME}.zsync" "${ARTIFACTS_DIR}/"
  34. fi
  35. . .ci/scripts/common/post-upload.sh