chore: Update PyInstaller command in build-and-release.yml to include… #14
Workflow file for this run
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: Build and Release | |
on: | |
push: | |
tags: | |
- "v*" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Install dependencies | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
sudo apt-get update | |
sudo apt-get install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf | |
fi | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install pyinstaller | |
shell: bash | |
- name: Build with PyInstaller | |
run: | | |
python -c "import sys; print(sys.executable)" | |
python -m PyInstaller --onefile --windowed --add-data "images:images" --add-data "sounds:sounds" --name patience main.py | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: patience-${{ matrix.os }} | |
path: dist/* | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
patience-ubuntu-latest/* | |
patience-windows-latest/* | |
patience-macos-latest/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |