Update README to include donation link #11
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 and Tag | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: pip install pyinstaller pypresence psutil pystray pillow | |
| - name: Build executable | |
| run: | | |
| pyinstaller --onefile --windowed ` | |
| --name "HytaleRPC" ` | |
| --add-data "src;src" ` | |
| --hidden-import pystray ` | |
| --hidden-import PIL ` | |
| --hidden-import pypresence ` | |
| --hidden-import psutil ` | |
| hytale_rpc_windows.py | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: HytaleRPC-Windows | |
| path: dist/HytaleRPC.exe | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: pip install pyinstaller pypresence psutil pystray pillow | |
| - name: Build executable | |
| run: | | |
| python3 -m PyInstaller --onefile \ | |
| --name "HytaleRPC" \ | |
| --add-data "src:src" \ | |
| --hidden-import pystray \ | |
| --hidden-import PIL \ | |
| --hidden-import pypresence \ | |
| --hidden-import psutil \ | |
| --hidden-import pystray._xorg \ | |
| hytale_rpc.py | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: HytaleRPC-Linux | |
| path: dist/HytaleRPC | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: pip install pyinstaller pypresence psutil rumps | |
| - name: Build app | |
| run: | | |
| python3 -m PyInstaller --windowed \ | |
| --name "Hytale RPC" \ | |
| --icon "assets/icon.icns" \ | |
| --add-data "src:src" \ | |
| --hidden-import rumps \ | |
| --hidden-import pypresence \ | |
| --hidden-import psutil \ | |
| --exclude-module PIL \ | |
| --exclude-module numpy \ | |
| --exclude-module pandas \ | |
| --exclude-module matplotlib \ | |
| --exclude-module scipy \ | |
| --exclude-module tkinter \ | |
| --exclude-module test \ | |
| --exclude-module unittest \ | |
| --osx-bundle-identifier com.hytale.rpc \ | |
| hytale_rpc_macos.py | |
| /usr/libexec/PlistBuddy -c "Add :LSUIElement bool true" "dist/Hytale RPC.app/Contents/Info.plist" | |
| - name: Create DMG | |
| run: | | |
| mkdir -p /tmp/hytale-dmg | |
| cp -r "dist/Hytale RPC.app" /tmp/hytale-dmg/ | |
| ln -s /Applications /tmp/hytale-dmg/Applications | |
| hdiutil create -volname "Hytale RPC" \ | |
| -srcfolder /tmp/hytale-dmg \ | |
| -ov -format UDZO \ | |
| "HytaleRPC.dmg" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: HytaleRPC-macOS | |
| path: HytaleRPC.dmg | |
| create-tag: | |
| needs: [build-windows, build-linux, build-macos] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Create and push tag | |
| run: | | |
| git tag v1.1.2 | |
| git push https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/bas3line/hytale-rpc.git v1.1.2 | |
| echo "Created tag: v1.1.2" |