summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2020-03-27 20:43:55 +0000
committersr55 <[email protected]>2020-03-27 20:44:19 +0000
commit009e0f715d1819f1cc1ed280e8d28c39add798c2 (patch)
treebb0daa8df5994953f6661dc2aca600a10e8537ab
parenteed5cbdd841ea1a86ad104eb02ee38d8e462dd07 (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
-rw-r--r--.github/workflows/linux.yml10
-rw-r--r--.github/workflows/mac.yml23
-rw-r--r--.github/workflows/windows.yml60
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