Regenerate ICO: render each size directly from SVG for sharp icons #9
Workflow file for this run
This file contains hidden or 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 & Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: pip install -r requirements-windows.txt | |
| - name: Build exe | |
| run: pyinstaller MusicPresence.spec --distpath dist --workpath build | |
| - name: Build installer (Inno Setup) | |
| env: | |
| APP_VERSION: ${{ github.ref_name }} | |
| run: | | |
| mkdir installer\installer_output | |
| & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer\MusicPresence.iss | |
| - name: Upload portable exe | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: MusicPresence-windows-portable | |
| path: dist/MusicPresence.exe | |
| - name: Upload installer | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: MusicPresence-windows-setup | |
| path: installer/installer_output/MusicPresence-Setup-*.exe | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libdbus-1-dev \ | |
| libglib2.0-dev \ | |
| libcairo2-dev \ | |
| libgirepository-2.0-dev \ | |
| gir1.2-appindicator3-0.1 \ | |
| pkg-config \ | |
| fuse \ | |
| libfuse2 | |
| - name: Install dependencies | |
| run: pip install -r requirements-linux.txt | |
| - name: Build binary | |
| run: pyinstaller MusicPresence.spec --distpath dist --workpath build | |
| - name: Build AppImage | |
| env: | |
| APP_VERSION: ${{ github.ref_name }} | |
| run: | | |
| # Téléchargement appimagetool | |
| wget -q "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" -O appimagetool | |
| chmod +x appimagetool | |
| # Structure AppDir | |
| mkdir -p AppDir/usr/bin | |
| cp dist/MusicPresence AppDir/usr/bin/MusicPresence | |
| chmod +x AppDir/usr/bin/MusicPresence | |
| # Icône | |
| cp assets/icon.png AppDir/MusicPresence.png | |
| # .desktop | |
| cp installer/MusicPresence.desktop AppDir/MusicPresence.desktop | |
| # AppRun | |
| cat > AppDir/AppRun << 'EOF' | |
| #!/bin/bash | |
| SELF=$(readlink -f "$0") | |
| HERE="${SELF%/*}" | |
| exec "$HERE/usr/bin/MusicPresence" "$@" | |
| EOF | |
| chmod +x AppDir/AppRun | |
| # Build AppImage | |
| ARCH=x86_64 ./appimagetool AppDir MusicPresence-$APP_VERSION-x86_64.AppImage | |
| - name: Upload binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: MusicPresence-linux-binary | |
| path: dist/MusicPresence | |
| - name: Upload AppImage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: MusicPresence-linux-appimage | |
| path: MusicPresence-*.AppImage | |
| release: | |
| needs: [build-windows, build-linux] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: MusicLocal Discord Presence ${{ github.ref_name }} | |
| body: | | |
| ## Installation | |
| ### Windows | |
| | Fichier | Description | | |
| |---|---| | |
| | `MusicPresence-Setup-*.exe` | Installeur (recommandé) | | |
| | `MusicPresence.exe` | Portable, sans installation | | |
| ### Linux | |
| | Fichier | Description | | |
| |---|---| | |
| | `MusicPresence-*-x86_64.AppImage` | AppImage universel | | |
| | `MusicPresence` | Binaire portable | | |
| > Placez votre fichier `.env` dans le même dossier que l'exécutable. | |
| files: | | |
| artifacts/MusicPresence-windows-setup/MusicPresence-Setup-*.exe | |
| artifacts/MusicPresence-windows-portable/MusicPresence.exe | |
| artifacts/MusicPresence-linux-appimage/MusicPresence-*.AppImage | |
| artifacts/MusicPresence-linux-binary/MusicPresence |