build(deps): bump actions/upload-artifact from 5 to 6 #4777
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: Windows Build | |
| on: [push, pull_request] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_mingw_arm: | |
| name: CLI / LibHB (ARM) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Environment Setup | |
| run: | | |
| sudo apt-get install automake autoconf build-essential libtool libtool-bin make meson nasm patch tar yasm zlib1g-dev ninja-build gzip pax | |
| rustup target add aarch64-pc-windows-gnullvm | |
| - name: Setup Toolchain | |
| run: | | |
| wget https://github.com/HandBrake/HandBrake-toolchains/releases/download/1.0/llvm-mingw-20250319-msvcrt-ubuntu-20.04-x86_64.tar.xz | |
| SHA=$(sha1sum llvm-mingw-20250319-msvcrt-ubuntu-20.04-x86_64.tar.xz) | |
| EXPECTED="3a9b127c62220c7bf4beec1638d5608d350dc452 llvm-mingw-20250319-msvcrt-ubuntu-20.04-x86_64.tar.xz" | |
| if [ "$SHA" == "$EXPECTED" ]; | |
| then | |
| echo "Toolchain Verified. Extracting ..." | |
| mkdir toolchains | |
| mv llvm-mingw-20250319-msvcrt-ubuntu-20.04-x86_64.tar.xz toolchains | |
| cd toolchains | |
| tar xvf llvm-mingw-20250319-msvcrt-ubuntu-20.04-x86_64.tar.xz | |
| else | |
| echo "Toolchain Verification FAILED. Exiting!" | |
| return -1 | |
| fi | |
| - name: Setup Cargo-C Toolchain | |
| if: steps.windows-cargo-c-toolchain.outputs.cache-hit != 'true' | |
| run: | | |
| cargo install cargo-c | |
| - name: Build CLI and LibHB | |
| run: | | |
| export PATH="/home/runner/work/HandBrake/HandBrake/toolchains/llvm-mingw-20250319-msvcrt-ubuntu-20.04-x86_64/bin:${PATH}" | |
| export PATH=/usr/bin:$PATH | |
| ./configure --cross=aarch64-w64-mingw32 --enable-mf --launch-jobs=0 --launch | |
| cd build | |
| make pkg.create.zip | |
| cd libhb | |
| mv hb.dll hb_a64.dll | |
| - name: Upload HandBrakeCLI | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: HandBrakeCLI_ARM64 | |
| path: ./build/HandBrakeCLI.exe | |
| - name: Upload LibHB | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: LibHandBrake_ARM64 | |
| path: ./build/libhb/hb_a64.dll | |
| build_mingw: | |
| name: CLI / LibHB | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Cargo-C Toolchain Cache | |
| id: windows-cargo-c-toolchain | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/cargo-capi | |
| ~/.cargo/bin/cargo-cbuild | |
| ~/.cargo/bin/cargo-cinstall | |
| key: ${{ runner.os }}-${{ runner.arch }}-windows-cargo-c-toolchain | |
| - name: Setup Environment | |
| run: | | |
| sudo apt-get install automake autoconf build-essential libtool libtool-bin make meson nasm patch tar yasm zlib1g-dev ninja-build gzip pax libssl-dev | |
| rustup target add x86_64-pc-windows-gnu | |
| - name: Setup Toolchain | |
| run: | | |
| wget https://github.com/bradleysepos/mingw-w64-build/releases/download/10.0.0/mingw-w64-toolchain-10.0.0-msvcrt-linux-x86_64.tar.gz | |
| SHA=$(sha1sum mingw-w64-toolchain-10.0.0-msvcrt-linux-x86_64.tar.gz) | |
| EXPECTED="f7250d140a72bdfdda2d4cd01d84e9a3938132b1 mingw-w64-toolchain-10.0.0-msvcrt-linux-x86_64.tar.gz" | |
| if [ "$SHA" == "$EXPECTED" ]; | |
| then | |
| echo "Toolchain Verified. Extracting ..." | |
| mkdir toolchains | |
| mv mingw-w64-toolchain-10.0.0-msvcrt-linux-x86_64.tar.gz toolchains | |
| cd toolchains | |
| tar xvf mingw-w64-toolchain-10.0.0-msvcrt-linux-x86_64.tar.gz | |
| cd mingw-w64-toolchain-10.0.0-msvcrt-linux-x86_64/mingw-w64-x86_64/ | |
| pwd | |
| else | |
| echo "Toolchain Verification FAILED. Exiting!" | |
| return -1 | |
| fi | |
| - name: Setup Cargo-C Toolchain | |
| if: steps.windows-cargo-c-toolchain.outputs.cache-hit != 'true' | |
| run: | | |
| cargo install cargo-c | |
| - name: Build CLI and LibHB | |
| run: | | |
| export PATH="/home/runner/work/HandBrake/HandBrake/toolchains/mingw-w64-toolchain-10.0.0-msvcrt-linux-x86_64/mingw-w64-x86_64/bin:${PATH}" | |
| export PATH=/usr/bin:$PATH | |
| ./configure --cross=x86_64-w64-mingw32 --enable-qsv --enable-vce --enable-nvenc --enable-nvdec --launch-jobs=0 --launch | |
| cd build | |
| make pkg.create.zip | |
| - name: Upload HandBrakeCLI | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: HandBrakeCLI | |
| path: ./build/HandBrakeCLI.exe | |
| - name: Upload LibHB | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: LibHandBrake | |
| path: ./build/libhb/hb.dll | |
| build_gui: | |
| name: Windows UI | |
| runs-on: windows-2022 | |
| needs: [build_mingw] | |
| env: | |
| SigningCertificate: ${{ secrets.HandBrakeTeam_SignFile }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download LibHandBrake | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: LibHandBrake | |
| path: win/CS/HandBrakeWPF/bin/publish | |
| - name: Import the Signing Cert | |
| run: | | |
| $ErrorView = "NormalView" | |
| if (-NOT ($env:SigningCertificate -eq '')) { | |
| $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.HandBrakeTeam_Pfx }}") | |
| $currentDirectory = Get-Location | |
| $certificatePath = Join-Path -Path $currentDirectory -ChildPath $env:SigningCertificate | |
| $certPassword = ConvertTo-SecureString -String ${{ secrets.HandBrakeTeam_pfx_pwd }} -Force –AsPlainText | |
| [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte) | |
| cp $certificatePath win\cs\ | |
| } | |
| - name: Setup .NET 10 | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: "10.0.x" | |
| - name: Add NSIS to PATH | |
| shell: pwsh | |
| run: Add-Content -Path $env:GITHUB_PATH -Value "C:\Program Files (x86)\NSIS" | |
| - name: Build Windows GUI | |
| shell: pwsh | |
| run: | | |
| dotnet msbuild win\cs\build.xml /t:x64 /p:PfxFile=$env:SigningCertificate /p:PfxPwd=${{ secrets.HandBrakeTeam_pfx_pwd }} /p:SignTimestampServer=http://time.certum.pl/ | |
| - name: Prepare Package | |
| run: | | |
| echo "Setting up context" | |
| dir | |
| git rev-parse --short HEAD > gitHash.txt | |
| set /p gitHash=<gitHash.txt | |
| set FILENAME=HandBrake-%gitHash%-x64-Win_GUI.exe | |
| set FILENAMEZIP=HandBrake-%gitHash%-x64-Win_GUI.zip | |
| echo %FILENAME% | |
| echo %FILENAMEZIP% | |
| echo "Renaming Windows Installer file" | |
| cd win/CS/HandBrakeWPF/bin/publish/ | |
| dir | |
| move HandBrake-*-Win_GUI.exe %FILENAME% | |
| dir | |
| cd .. | |
| dir | |
| echo "Creating Zip Package" | |
| rmdir /q /s Debug | |
| move publish HandBrake | |
| 7z a %FILENAMEZIP% * -x!Release\ -x!HandBrake\%FILENAME% -x!HandBrake\*.nsi -x!HandBrake\*.config -x!*HandBrake\*.xml -x!*HandBrake\*.pdb -x!*HandBrake\*.bmp -x!HandBrake\*.zip -x!HandBrake\*.bz2 -x!HandBrake\*.msi -mx9 | |
| dir | |
| cd ../../../../ | |
| dir | |
| shell: cmd | |
| - name: Upload HandBrake Installer | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: HandBrake-Win_GUI-x64 | |
| path: win/CS/HandBrakeWPF/bin/HandBrake/HandBrake*.exe | |
| - name: Upload HandBrake ZIP | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: HandBrake-Win_GUI-x64-Zip | |
| path: win/CS/HandBrakeWPF/bin/*-Win_GUI.zip | |
| build_gui_arm: | |
| name: Windows UI ARM | |
| runs-on: windows-2022 | |
| needs: [build_mingw_arm] | |
| env: | |
| SigningCertificate: ${{ secrets.HandBrakeTeam_SignFile }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download LibHandBrake_ARM64 | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: LibHandBrake_ARM64 | |
| path: win/CS/HandBrakeWPF/bin/publish | |
| - name: Import the Signing Cert | |
| run: | | |
| $ErrorView = "NormalView" | |
| if (-NOT ($env:SigningCertificate -eq '')) { | |
| $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.HandBrakeTeam_Pfx }}") | |
| $currentDirectory = Get-Location | |
| $certificatePath = Join-Path -Path $currentDirectory -ChildPath $env:SigningCertificate | |
| $certPassword = ConvertTo-SecureString -String ${{ secrets.HandBrakeTeam_pfx_pwd }} -Force –AsPlainText | |
| [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte) | |
| cp $certificatePath win\cs\ | |
| } | |
| - name: Setup .NET 10 | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: "10.0.x" | |
| - name: Add NSIS to PATH | |
| shell: pwsh | |
| run: Add-Content -Path $env:GITHUB_PATH -Value "C:\Program Files (x86)\NSIS" | |
| - name: Build Windows GUI | |
| shell: pwsh | |
| run: | | |
| dotnet msbuild win\cs\build.xml /t:arm64 /p:PfxFile=$env:SigningCertificate /p:PfxPwd=${{ secrets.HandBrakeTeam_pfx_pwd }} /p:SignTimestampServer=http://time.certum.pl/ | |
| - name: Prepare Package | |
| run: | | |
| echo "Setting up context" | |
| dir | |
| git rev-parse --short HEAD > gitHash.txt | |
| set /p gitHash=<gitHash.txt | |
| set FILENAME=HandBrake-%gitHash%-arm64-Win_GUI.exe | |
| set FILENAMEZIP=HandBrake-%gitHash%-arm64-Win_GUI.zip | |
| echo %FILENAME% | |
| echo %FILENAMEZIP% | |
| echo "Renaming Windows Installer file" | |
| cd win/CS/HandBrakeWPF/bin/publish/ | |
| dir | |
| move HandBrake-*-Win_GUI.exe %FILENAME% | |
| dir | |
| cd .. | |
| dir | |
| echo "Creating Zip Package" | |
| rmdir /q /s Debug | |
| move publish HandBrake | |
| 7z a %FILENAMEZIP% * -x!Release\ -x!HandBrake\%FILENAME% -x!HandBrake\*.nsi -x!HandBrake\*.config -x!*HandBrake\*.xml -x!*HandBrake\*.pdb -x!*HandBrake\*.bmp -x!HandBrake\*.zip -x!HandBrake\*.bz2 -x!HandBrake\*.msi -mx9 | |
| dir | |
| cd ../../../../ | |
| dir | |
| shell: cmd | |
| - name: Upload HandBrake Installer | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: HandBrake-Win_GUI-ARM64 | |
| path: win/CS/HandBrakeWPF/bin/HandBrake/HandBrake*.exe | |
| - name: Upload HandBrake ZIP | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: HandBrake-Win_GUI-ARM64-Zip | |
| path: win/CS/HandBrakeWPF/bin/*-Win_GUI.zip | |