Add debug echo #120
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 Multi-Platform | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Tag name (e.g. v1.2.3)" | |
| required: false | |
| default: "" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.asset_name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Windows x64 (Runs on Win ARM64 via emulation) | |
| - os: windows-latest | |
| architecture: x64 | |
| asset_name: livestream_dl-windows-x64.exe | |
| executable_name: livestream_dl.exe | |
| use_qemu: false | |
| - os: windows-11-arm | |
| architecture: arm64 | |
| asset_name: livestream_dl-windows-arm64.exe | |
| executable_name: livestream_dl.exe | |
| use_qemu: false | |
| # Linux x64 | |
| - os: ubuntu-latest | |
| architecture: x64 | |
| asset_name: livestream_dl-linux-x64 | |
| executable_name: livestream_dl | |
| use_qemu: false | |
| # Linux ARM64 | |
| - os: ubuntu-24.04-arm | |
| architecture: arm64 | |
| asset_name: livestream_dl-linux-arm64 | |
| executable_name: livestream_dl | |
| use_qemu: false | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| # --- QEMU Setup for Linux ARM64 --- | |
| - name: Set up QEMU | |
| if: ${{ matrix.use_qemu }} | |
| uses: docker/setup-qemu-action@v3 | |
| # --- Python Setup --- | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| architecture: ${{ matrix.architecture == 'aarch64' && 'x64' || matrix.architecture }} | |
| # --- Install Dependencies --- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -U --pre "yt-dlp[default]" | |
| pip install pyinstaller | |
| python -c "import urllib.request; urllib.request.urlretrieve('https://raw.githubusercontent.com/yt-dlp/yt-dlp/master/devscripts/cli_to_api.py', 'cli_to_api.py')" | |
| # --- Build Step --- | |
| - name: Build Executable | |
| run: | | |
| pyinstaller --onefile --name livestream_dl --hidden-import yt_dlp_ejs runner.py | |
| # --- Rename for Upload --- | |
| - name: Rename Output | |
| shell: bash | |
| run: | | |
| # Check if using Windows or Linux dist folder location | |
| if [ -f "dist/${{ matrix.executable_name }}" ]; then | |
| mv "dist/${{ matrix.executable_name }}" "dist/${{ matrix.asset_name }}" | |
| fi | |
| # --- Upload Artifacts (To be grabbed by Release job) --- | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.asset_name }} | |
| path: dist/${{ matrix.asset_name }} | |
| release: | |
| name: Create Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get current date | |
| id: date | |
| run: echo "DATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV | |
| - name: Download All Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: List Artifacts | |
| run: ls -R artifacts | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: "v${{ env.DATE }}-${{ github.run_number }}" | |
| name: "Alpha Release - ${{ env.DATE }}" | |
| body: | | |
| ### ⚠️ Alpha State | |
| This release is currently in an **alpha state**. | |
| **Dependencies Required:** | |
| * **FFmpeg**: Must be installed and added to your system PATH. | |
| * **Deno**: Must be installed and added to your system PATH. | |
| **Downloads:** | |
| | Platform | Architecture | Filename | | |
| | :--- | :--- | :--- | | |
| | 🪟 Windows | x64 (Intel/AMD) | `livestream_dl-windows-x64.exe` | | |
| | 🐧 Linux | x64 (Intel/AMD) | `livestream_dl-linux-x64` | | |
| | 🐧 Linux | arm64 (RPi/Server) | `livestream_dl-linux-arm64` | | |
| draft: false | |
| prerelease: true | |
| files: artifacts/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |