Update build.yml #4
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-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 dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pyinstaller | |
| - name: Build with PyInstaller | |
| run: | | |
| pyinstaller pyinstaller.spec | |
| - name: Package artifact | |
| run: | | |
| cd dist | |
| # onefile → single binary named CTkDesigner (no extension on Linux) | |
| tar -czf CTkDesigner-linux-x64.tar.gz CTkDesigner | |
| ls -lah | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: CTkDesigner-linux-x64 | |
| path: dist/CTkDesigner-linux-x64.tar.gz | |
| 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 dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pyinstaller | |
| - name: Build with PyInstaller | |
| run: | | |
| pyinstaller pyinstaller.spec | |
| - name: Package artifact | |
| run: | | |
| cd dist | |
| # onefile → single binary named CTkDesigner.exe on Windows | |
| Compress-Archive -Path CTkDesigner.exe -DestinationPath CTkDesigner-windows-x64.zip | |
| dir | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: CTkDesigner-windows-x64 | |
| path: dist/CTkDesigner-windows-x64.zip | |
| release: | |
| needs: [build-linux, build-windows] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: List artifacts | |
| run: find artifacts -type f | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| artifacts/CTkDesigner-linux-x64/CTkDesigner-linux-x64.tar.gz | |
| artifacts/CTkDesigner-windows-x64/CTkDesigner-windows-x64.zip | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |