Skip to content

Build ubuntu packages #14

Build ubuntu packages

Build ubuntu packages #14

name: Build ubuntu packages
env:
#version: '0.35.1'
#branch: 'mod-0.35.1'
version: '0.36.0'
branch: 'master'
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
strategy:
fail-fast: false
matrix:
config:
- { name: 'xenial', os: 'ubuntu-latest', container: 'wachii/ubuntu-qt:16.04' }
- { name: 'bionic', os: 'ubuntu-latest', container: 'wachii/ubuntu-qt:18.04' }
- { name: 'focal', os: 'ubuntu-20.04', container: '' }
- { name: 'jammy', os: 'ubuntu-22.04', container: '' }
runs-on: ${{ matrix.config.os }}
container: ${{ matrix.config.container }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: 'mpv'
ref: ${{ env.branch }}
- name: Install debian dir
run: |
git clone https://github.com/smplayer-dev/mpv-deb-packages.git deb
mv deb/debian mpv/debian
- name: Add ffmpeg repository
if: ${{ matrix.config.name == 'xenial' || matrix.config.name == 'bionic' }}
run: sudo add-apt-repository -y ppa:jonathonf/ffmpeg-4
- name: Install devscripts
run: |
sudo apt-get -y update
sudo apt-get -y install devscripts equivs
#sudo apt-get -y upgrade
- name: Install build dependencies
run: |
cd mpv
dch -b -v ${{ env.version }}-1~`lsb_release -cs` "Automatic build"
mk-build-deps
ls *.deb
dpkg --info ./mpv-build-deps*.deb
sudo apt-get -y install ./mpv-build-deps*.deb --no-install-recommends
- name: Prepare sources
run: |
#mkdir mpv/debian
#cp -R debian/* mpv/debian
cd mpv
./bootstrap.py
- name: Build
run: |
cd mpv
fakeroot debian/rules build
fakeroot debian/rules binary
ls -l ../*.deb
- name: Rename package
run: |
sudo apt-get -y install rename
rename 's/mpv_/mpv-mod_/' mpv_*.deb
- name: Create artifact
uses: actions/upload-artifact@v2
with:
name: mpv-${{ env.version }}-${{ matrix.config.name }}
path: ./*.deb
- name: Upload package to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./*.deb
tag: ${{ github.ref }}
overwrite: true
file_glob: true