Linux AppImage #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux AppImage | |
on: | |
push: | |
paths: | |
- 'repack_appimage.sh' | |
- '.github/workflows/appimage.yml' | |
pull_request: | |
paths: | |
- 'repack_appimage.sh' | |
- '.github/workflows/appimage.yml' | |
workflow_dispatch: | |
jobs: | |
install_and_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 # 指定 Python 3 版本 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install -y libgtk-3-0 libnotify4 libnss3 libxss1 libxtst6 xdg-utils libatspi2.0-0 libuuid1 libsecret-1-0 squashfs-tools libfuse2 | |
python3 -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Download QQ Software | |
run: | | |
python3 get_qqnt.py AppImage | |
wget --no-check-certificate --content-disposition https://github.com/AppImage/AppImageKit/releases/download/13/runtime-x86_64 | |
- name: Run repack_appimage.sh | |
run: | | |
chmod +x repack_appimage.sh | |
./repack_appimage.sh | |
- name: Check output and directory existence | |
run: | | |
if ! ./QQ.AppImage --logging-enable | grep -q "[LiteLoader]" || [ ! -d "$HOME/.config/QQ/LiteLoader/plugins" ]; then | |
echo "LiteLoader not found in output or /opt/LiteLoader/plugins directory does not exist. Test failed." | |
exit 1 | |
else | |
echo "LiteLoader found in output and /opt/LiteLoader/plugins directory exists. Test succeeded." | |
fi | |
- name: Upload QQ # 手动触发时上传 | |
if: github.event_name == 'workflow_dispatch' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: QQ | |
path: QQ.AppImage | |