name: Build Windows EXE on: push: branches: ["main"] workflow_dispatch: jobs: build: runs-on: Ubuntu_docker_act steps: - name: Install Node.js and Python run: | apt-get update apt-get install -y curl wget git # 安装 Node.js 18 curl -fsSL https://deb.nodesource.com/setup_18.x | bash - apt-get install -y nodejs # 安装 Python 3.13 apt-get install -y software-properties-common add-apt-repository ppa:deadsnakes/ppa -y apt-get update apt-get install -y python3.13 python3.13-dev python3.13-distutils curl -sS https://bootstrap.pypa.io/get-pip.py | python3.13 ln -sf /usr/bin/python3.13 /usr/bin/python ln -sf /usr/bin/python3.13 /usr/bin/python3 # 验证安装 node --version python --version - uses: actions/checkout@v4 - name: Setup Python (确保使用正确的版本) run: | python --version pip --version - name: Install dependencies run: | python -m pip install --upgrade pip pip install pyinstaller keyboard pywin32 - name: Build EXE run: | pyinstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py - name: Upload Artifact uses: actions/upload-artifact@v4 with: name: Shortcut_Sync_PotPlayer path: dist/Shortcut_Sync_PotPlayer.exe