Version 24.5.0.10342 #92
Workflow file for this run
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 Ubuntu Packages | |
env: | |
app-name: 'smplayer' | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
#- { name: 'bionic', os: 'ubuntu-18.04', qt: 5 } | |
- { name: 'focal', os: 'ubuntu-20.04', qt: 5 } | |
- { name: 'jammy', os: 'ubuntu-22.04', qt: 5 } | |
- { name: 'noble', os: 'ubuntu-24.04', qt: 5 } | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- name: Install sources | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.app-name }} | |
fetch-depth: 0 | |
- name: Install development packages | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install zlib1g-dev fakeroot build-essential devscripts debhelper g++ | |
- name: Install Qt 4 | |
run: sudo apt-get -y install libqt4-dev | |
if: ${{ matrix.config.qt == 4 }} | |
- name: Install Qt 5 | |
run: | | |
sudo apt-get -y install qtbase5-dev qt5-qmake qtscript5-dev qttools5-dev-tools qtbase5-private-dev qtdeclarative5-dev | |
echo "QT_SELECT=qt5" >> $GITHUB_ENV | |
if: ${{ matrix.config.qt == 5 }} | |
- name: Prepare sources | |
run: | | |
cd ${{ env.app-name }} | |
ln -s debian-orig debian | |
cp debian-orig/changelog-orig debian-orig/changelog | |
./get_version.sh | |
VERSION=`cat version`-1~`lsb_release -is`-`lsb_release -cs` | |
VERSION=`echo $VERSION | tr '[:upper:]' '[:lower:]'` | |
dch -v $VERSION "Development version" | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Compile ${{ env.app-name }} | |
run: cd ${{ env.app-name }} && fakeroot debian/rules build | |
- name: Build package | |
run: | | |
cd ${{ env.app-name }} && fakeroot debian/rules binary | |
cd .. | |
PACKAGEFILENAME=`ls ${{ env.app-name }}_*.deb` | |
echo "PACKAGEFILENAME=$PACKAGEFILENAME" >> $GITHUB_ENV | |
- name: Create artifact | |
if: github.event_name != 'release' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.PACKAGEFILENAME }} | |
path: ./${{ env.app-name }}_*.deb | |
- name: Upload package to release | |
if: github.event_name == 'release' | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./${{ env.app-name }}_*.deb | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true |