Standardize naming to br-equipment-control-app across all platforms #3
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 Executables | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install PyInstaller | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pyinstaller | |
| - name: Build Windows executable | |
| run: | | |
| pyinstaller build.spec | |
| - name: Create zip archive | |
| run: | | |
| cd dist | |
| Compress-Archive -Path "br-equipment-control-app" -DestinationPath "br-equipment-control-app-windows.zip" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-build | |
| path: dist/br-equipment-control-app-windows.zip | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install PyInstaller | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pyinstaller | |
| - name: Build macOS app | |
| run: | | |
| pyinstaller build.spec | |
| - name: Create DMG (optional, requires create-dmg) | |
| run: | | |
| brew install create-dmg | |
| cd dist | |
| create-dmg \ | |
| --volname "br-equipment-control-app" \ | |
| --volicon "../assets/icon.png" \ | |
| --window-pos 200 120 \ | |
| --window-size 800 400 \ | |
| --icon-size 100 \ | |
| --icon "br-equipment-control-app.app" 200 190 \ | |
| --hide-extension "br-equipment-control-app.app" \ | |
| --app-drop-link 600 185 \ | |
| "br-equipment-control-app-macos.dmg" \ | |
| "br-equipment-control-app.app" | |
| continue-on-error: true | |
| - name: Create zip fallback if DMG fails | |
| run: | | |
| cd dist | |
| if [ ! -f "br-equipment-control-app-macos.dmg" ]; then | |
| zip -r "br-equipment-control-app-macos.zip" "br-equipment-control-app.app" | |
| fi | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-build | |
| path: | | |
| dist/br-equipment-control-app-macos.dmg | |
| dist/br-equipment-control-app-macos.zip | |
| build-linux: | |
| 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.11' | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y python3-tk | |
| - name: Install PyInstaller | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pyinstaller | |
| - name: Build Linux executable | |
| run: | | |
| pyinstaller build.spec | |
| - name: Create tar.gz archive | |
| run: | | |
| cd dist | |
| tar -czf br-equipment-control-app-linux.tar.gz br-equipment-control-app/ | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-build | |
| path: dist/br-equipment-control-app-linux.tar.gz | |
| create-release: | |
| needs: [build-windows, build-macos, build-linux] | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Display structure | |
| run: ls -R artifacts | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| artifacts/windows-build/br-equipment-control-app-windows.zip | |
| artifacts/macos-build/br-equipment-control-app-macos.dmg | |
| artifacts/macos-build/br-equipment-control-app-macos.zip | |
| artifacts/linux-build/br-equipment-control-app-linux.tar.gz | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |