Nightly Release #147
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: Nightly Release | |
| # Ensure the workflow has write permission to repository contents so the release can be created | |
| permissions: | |
| contents: write | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| build-windows: | |
| name: Build Windows | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14" | |
| - name: Install dependencies | |
| shell: pwsh | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pyinstaller zstandard pywin32 | |
| - name: Update version.json | |
| shell: pwsh | |
| run: | | |
| $date = Get-Date -Format "yyyy.MM.dd" | |
| $json = Get-Content -Path version.json | ConvertFrom-Json | |
| $json.version = "$date-nightly" | |
| $json | ConvertTo-Json | Set-Content -Path version.json | |
| Write-Host "Updated version.json" | |
| - name: Build exe | |
| shell: pwsh | |
| run: | | |
| python build_pyinstaller.py | |
| Compress-Archive -Path dist/Luminalium/* -DestinationPath Luminalium-Windows.zip | |
| - name: Upload Windows Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Luminalium-Windows | |
| path: Luminalium-Windows.zip | |
| build-linux: | |
| name: Build Linux | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - 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 libgl1 libegl1 libxkbcommon-x11-0 libdbus-1-3 libfontconfig1 libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xinerama0 libxcb-xfixes0 binutils | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt pyinstaller | |
| - name: Build binary | |
| run: | | |
| python build_linux.py | |
| cd dist/Luminalium | |
| tar -czvf ../../Luminalium-Linux.tar.gz * | |
| - name: Upload Linux Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Luminalium-Linux | |
| path: Luminalium-Linux.tar.gz | |
| release: | |
| name: Create Release | |
| needs: [build-windows, build-linux] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| - name: List artifacts | |
| run: ls -R | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| allowUpdates: true | |
| tag: nightly | |
| name: Nightly Build | |
| body: | | |
| Luminalium Nightly Build | |
| 这是自动构建的开发版本,不保证稳定性。 | |
| prerelease: true | |
| makeLatest: true | |
| artifacts: "Luminalium-Windows/Luminalium-Windows.zip,Luminalium-Linux/Luminalium-Linux.tar.gz" | |
| token: ${{ secrets.GITHUB_TOKEN }} |