diff options
author | sr55 <[email protected]> | 2020-03-27 20:43:55 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2020-03-27 20:44:19 +0000 |
commit | 009e0f715d1819f1cc1ed280e8d28c39add798c2 (patch) | |
tree | bb0daa8df5994953f6661dc2aca600a10e8537ab /.github/workflows/windows.yml | |
parent | eed5cbdd841ea1a86ad104eb02ee38d8e462dd07 (diff) |
Improvements to our GitHub Actions.
- All: Remove repository restrictions.
- All: Add an action to cleanup artifacts older than 3 days
- Windows: Build a complete windows UI installer package including libhb
- Windows: Add support for code signing and sign with a self-signed certificate.
- Windows: Upload Artifacts
Diffstat (limited to '.github/workflows/windows.yml')
-rw-r--r-- | .github/workflows/windows.yml | 60 |
1 files changed, 46 insertions, 14 deletions
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 |