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 - name: Toolchain Cache id: mac-toolchain uses: actions/cache@v1 with: path: /usr/local key: mac-toolchain - name: Setup Environment if: steps.mac-toolchain.outputs.cache-hit != 'true' run: | scripts/mac-toolchain-build /usr/local - name: Build HandBrake run: | ./configure --launch-jobs=$(sysctl -n hw.ncpu) --launch cd build make pkg.create - name: Upload Assets uses: actions/upload-artifact@v2 with: name: HandBrake-macos path: ./build/pkg - name: Tidy up past artifacts uses: kolpav/purge-artifacts-action@v1 if: github.repository == 'HandBrake/HandBrake' with: token: ${{ secrets.GITHUB_TOKEN }} expire-in: 3days