-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7482d44
commit 32bb834
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Build Ubuntu Packages | ||
env: | ||
app-name: 'smplayer-skins' | ||
VERSION: '20.11.0' | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- { name: 'xenial', os: 'ubuntu-16.04', qt: 4 } | ||
- { name: 'bionic', os: 'ubuntu-18.04', qt: 5 } | ||
- { name: 'focal', os: 'ubuntu-20.04', qt: 5 } | ||
|
||
runs-on: ${{ matrix.config.os }} | ||
|
||
steps: | ||
- name: Install sources | ||
uses: actions/checkout@v2 | ||
with: | ||
path: ${{ env.app-name }} | ||
#fetch-depth: 0 | ||
|
||
- name: Install development packages | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install fakeroot build-essential devscripts debhelper | ||
- name: Install Qt 4 | ||
run: sudo apt-get install libqt4-dev | ||
if: ${{ matrix.config.qt == 4 }} | ||
|
||
- name: Install Qt 5 | ||
run: | | ||
sudo apt-get install qtbase5-dev-tools | ||
echo "QT_SELECT=qt5" >> $GITHUB_ENV | ||
if: ${{ matrix.config.qt == 5 }} | ||
|
||
- name: Prepare sources | ||
run: | | ||
cd ${{ env.app-name }} | ||
ln -s debian-orig debian | ||
dch -b -v 2:$VERSION~${{ matrix.config.name }} "Automatic build" | ||
- 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 | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.PACKAGEFILENAME }} | ||
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 |