diff options
-rw-r--r-- | .github/workflows/linux.yml | 10 | ||||
-rw-r--r-- | .github/workflows/mac.yml | 23 | ||||
-rw-r--r-- | .github/workflows/windows.yml | 60 |
3 files changed, 59 insertions, 34 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 88452f1d6..faa29faab 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -3,19 +3,9 @@ name: Linux Build on: [push, pull_request] jobs: - handle_forks: - name: Forked Repo - runs-on: ubuntu-latest - if: github.repository != 'HandBrake/HandBrake' - steps: - - name: Print Warning - run: | - echo "Builds are disabled for forked repositories." - build: name: Build on Ubuntu runs-on: ubuntu-latest - if: github.repository == 'HandBrake/HandBrake' steps: - uses: actions/checkout@master diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 86abf6a79..6cdd9894b 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -3,19 +3,9 @@ name: macOS build on: [push, pull_request] jobs: - handle_forks: - name: Forked Repo - runs-on: ubuntu-latest - if: github.repository != 'HandBrake/HandBrake' - steps: - - name: Print Warning - run: | - echo "Builds are disabled for forked repositories." - build: name: Build on macOS runs-on: macOS-latest - if: github.repository == 'HandBrake/HandBrake' steps: - uses: actions/checkout@master @@ -36,3 +26,16 @@ jobs: ./configure --launch-jobs=$(sysctl -n hw.ncpu) --launch cd build make pkg.create + + - name: Upload Assets + uses: actions/upload-artifact@v1 + with: + name: HandBrake-macos + path: ./build/pkg + + - name: Tidy up past artifacts + uses: kolpav/purge-artifacts-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + expire-in: 3days + diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 7b7d1ecbb..fcf2d97b7 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -3,19 +3,9 @@ name: Windows Build on: [push, pull_request] jobs: - handle_forks: - name: Forked Repo - runs-on: ubuntu-latest - if: github.repository != 'HandBrake/HandBrake' - steps: - - name: Print Warning - run: | - echo "Builds are disabled for forked repositories." - build_mingw: name: CLI / LibHB runs-on: ubuntu-latest - if: github.repository == 'HandBrake/HandBrake' steps: - uses: actions/checkout@master @@ -51,12 +41,26 @@ jobs: ./configure --cross=x86_64-w64-mingw32 --enable-qsv --enable-vce --enable-nvenc --launch-jobs=$(nproc) --launch cd build make pkg.create.zip + + - name: Upload HandBrakeCLI + uses: actions/upload-artifact@v1 + with: + name: HandBrakeCLI + path: ./build/HandBrakeCLI.exe + + - name: Upload LibHB + uses: actions/upload-artifact@v1 + with: + name: LibHandBrake + path: ./build/libhb/hb.dll build_gui: name: Windows UI runs-on: windows-latest - if: github.repository == 'HandBrake/HandBrake' needs: build_mingw + env: + SigningCertificate: ${{ secrets.HandBrakeTeam_SignFile }} + steps: - uses: actions/checkout@master @@ -68,15 +72,43 @@ jobs: move Inetc.zip plugins cd plugins 7z x Inetc.zip - dir - + - name: NuGet Restore run: | choco install nuget.commandline cd win/CS/ nuget restore HandBrake.sln + + - name: Download LibHandBrake + uses: actions/[email protected] + with: + name: LibHandBrake + path: win/CS/HandBrakeWPF/bin/x64/Release + + - name: Import the Signing Cert + if: github.repository == 'HandBrake/HandBrake' + run: | + $ErrorView = "NormalView" + $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: Build Windows GUI run: | $env:Path += ";C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin" - msbuild win\cs\build.xml /t:Nightly + msbuild win\cs\build.xml /t:Nightly /p:PfxFile=$env:SigningCertificate /p:PfxPwd=${{ secrets.HandBrakeTeam_pfx_pwd }} /p:SignTimestampServer=http://time.certum.pl/ + + - name: Upload Assets + uses: actions/upload-artifact@v1 + with: + name: HandBrake-x86_64-Win_GUI + path: win/CS/HandBrakeWPF/bin/x64/Release/HandBrake-Nightly_x86_64-Win_GUI.exe + + - name: Tidy up past artifacts + uses: kolpav/purge-artifacts-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + expire-in: 3days |