Merge branch 'develop' of github.com:coslyk/moonplayer into develop #90
This file contains 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: Build | |
on: | |
push: | |
branches: [ develop ] | |
jobs: | |
builds: | |
strategy: | |
matrix: | |
os: [windows-2019, ubuntu-20.04, macos-11] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: '6.5.*' | |
- name: Enable MSVC commands | |
if: matrix.os == 'windows-2019' | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Install MPV on Windows | |
if: matrix.os == 'windows-2019' | |
shell: cmd | |
run: scripts\win-install-mpv.bat | |
- name: Install Linux dependencies | |
if: matrix.os == 'ubuntu-20.04' | |
run: |- | |
sudo apt-get update | |
sudo apt-get install -y ffmpeg libmpv-dev libcurl4-openssl-dev libssl-dev libxkbcommon-x11-0 libxcb-cursor0 | |
- name: Install macOS dependencies | |
if: matrix.os == 'macos-11' | |
env: | |
HOMEBREW_NO_AUTO_UPDATE: 1 | |
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 | |
run: |- | |
brew tap coslyk/mpv | |
brew update | |
brew install openssl mpv-moonplayer freetype double-conversion icu4c jasper jpeg libb2 libtiff pcre2 | |
- name: Build | |
shell: bash | |
env: | |
RUNNING_OS: ${{ matrix.os }} | |
run: |- | |
if [ "$RUNNING_OS" -eq "windows-2019" ]; then | |
cmake -A x64 . | |
else | |
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr . | |
fi | |
cmake --build . --config Release | |
- name: Deploy | |
shell: bash | |
env: | |
RUNNING_OS: ${{ matrix.os }} | |
run: ./scripts/deploy-${RUNNING_OS}.sh | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: my-artifact | |
path: | | |
MoonPlayer_*.exe | |
MoonPlayer-*.AppImage | |
MoonPlayer_*.zip | |
publish: | |
runs-on: ubuntu-latest | |
needs: builds | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: my-artifact | |
- name: Upload packages | |
shell: bash | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
UPLOADTOOL_ISPRERELEASE: true | |
run: | | |
set -e | |
curl -Lo upload.sh https://github.com/probonopd/uploadtool/raw/master/upload.sh | |
bash upload.sh MoonPlayer* |