Init: pyLDAPGui, it's time to browse, here goes something - init release #28
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: | |
| branches: [ main ] | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [windows-latest, macos-latest, ubuntu-latest] | |
| python-version: ['3.10'] | |
| include: | |
| - os: windows-latest | |
| artifact-name: pyLDAPGui.exe | |
| build-cmd: python build_simple.py | |
| - os: macos-latest | |
| artifact-name: pyLDAPGui | |
| build-cmd: python build_simple.py | |
| - os: ubuntu-latest | |
| artifact-name: pyLDAPGui | |
| build-cmd: python build_simple.py | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install system dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y python3-dev \ | |
| libxcb-cursor0 libxcb-shape0 libxcb-render-util0 \ | |
| libxcb-util1 libxcb-image0 libxkbcommon-x11-0 \ | |
| libxcb-keysyms1 libxcb-xkb1 libxcb-icccm4 | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pyinstaller pillow | |
| - name: Build executable | |
| run: ${{ matrix.build-cmd }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ runner.os }}-executable | |
| path: | | |
| dist/pyLDAPGui* | |
| dist/*.exe | |
| dist/*.app | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| - name: Display structure of downloaded files | |
| run: ls -la | |
| - name: Prepare release assets | |
| run: | | |
| mkdir -p release-assets | |
| # Windows executable | |
| if [ -d "Windows-executable" ]; then | |
| cp Windows-executable/*.exe release-assets/pyLDAPGui-windows.exe || true | |
| fi | |
| # macOS executable (might be in a directory) | |
| if [ -d "macOS-executable" ]; then | |
| if [ -f "macOS-executable/pyLDAPGui" ]; then | |
| cp macOS-executable/pyLDAPGui release-assets/pyLDAPGui-macos | |
| elif [ -d "macOS-executable/pyLDAPGui" ]; then | |
| cd macOS-executable | |
| zip -r ../release-assets/pyLDAPGui-macos.zip pyLDAPGui/ | |
| cd .. | |
| fi | |
| fi | |
| # Linux executable | |
| if [ -d "Linux-executable" ]; then | |
| cp Linux-executable/pyLDAPGui release-assets/pyLDAPGui-linux || true | |
| fi | |
| # List what we have | |
| echo "Release assets:" | |
| ls -la release-assets/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: release-assets/* | |
| generate_release_notes: true | |
| prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }} | |
| name: ${{ github.ref_name }} | |
| body: | | |
| # pyLDAPGui ${{ github.ref_name }} | |
| ## Installation | |
| ### Windows | |
| Download `pyLDAPGui-windows.exe` and run it directly. | |
| ### macOS | |
| Download `pyLDAPGui-macos.zip`, extract it, and run the pyLDAPGui executable. | |
| You may need to allow it in System Preferences > Security & Privacy. | |
| ### Linux | |
| Download `pyLDAPGui-linux`, make it executable with `chmod +x pyLDAPGui-linux`, and run it. | |
| ## Known Issues | |
| - macOS builds may require security approval | |
| - Some antivirus software may flag the executables (false positive) |