Update github workflow actions for deprecations #158
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
# SPDX-FileCopyrightText: 2002 BigBlueButton Inc. and by respective authors | |
# | |
# SPDX-License-Identifier: LGPL-3.0-or-later | |
name: Package build | |
on: | |
push: | |
branches: [ "main" ] | |
tags: [ "**" ] | |
paths-ignore: | |
- debian/changelog | |
pull_request: | |
branches: [ "main" ] | |
paths-ignore: | |
- debian/changelog | |
jobs: | |
ubuntu: | |
strategy: | |
matrix: | |
UBUNTU_VERSION: [ "20.04" ] | |
include: | |
- UBUNTU_VERSION: "20.04" | |
UBUNTU_CODENAME: focal | |
runs-on: ubuntu-latest | |
container: ubuntu:${{ matrix.UBUNTU_VERSION }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Install debian packaging tools | |
run: | | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends software-properties-common | |
add-apt-repository -y ppa:git-core/ppa | |
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends debhelper devscripts equivs git git-buildpackage pristine-tar | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
with: | |
path: source | |
fetch-depth: 0 | |
- name: Set debian package version | |
env: | |
DEBFULLNAME: GitHub Actions | |
DEBEMAIL: hostmaster@blindsidenetworks.com | |
UBUNTU_CODENAME: ${{ matrix.UBUNTU_CODENAME }} | |
UBUNTU_VERSION: ${{ matrix.UBUNTU_VERSION }} | |
run: | | |
cd source | |
eval "$(./dch_version.sh | tee -a "${GITHUB_ENV}")" | |
dch --newversion "${DCH_VERSION}" --force-bad-version --distribution "${UBUNTU_CODENAME}" "Automatic Build" | |
- name: Cleanup .github directory | |
run: | | |
rm -r source/.github | |
- name: Install build dependencies | |
run: | | |
cd source | |
DEBIAN_FRONTEND=noninteractive mk-build-deps -i -r -t 'apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends' | |
- name: Build package | |
run: | | |
cd source | |
gbp buildpackage --git-ignore-new --git-ignore-branch --no-sign | |
ls .. | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ubuntu-${{ matrix.UBUNTU_VERSION }} | |
path: "*.deb" | |
if-no-files-found: error | |
amazonlinux-2: | |
runs-on: ubuntu-latest | |
container: amazonlinux:2 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Install Python and package build dependencies | |
run: | | |
amazon-linux-extras enable python3.8 ruby3.0 | |
yum clean metadata | |
yum install -y \ | |
python38 python38-devel python38-wheel \ | |
git gcc make \ | |
cairo-gobject-devel gobject-introspection-devel \ | |
ruby ruby-devel ruby-irb rubygem-rake rubygem-json rubygems \ | |
rpm-build | |
pip3.8 install virtualenv-tools3 | |
gem install --no-document fpm | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
path: bbb-presentation-video | |
- name: Build and install package to image directory | |
run: | | |
python3.8 -m venv bbb-presentation-video-image/opt/bbb-presentation-video | |
bbb-presentation-video-image/opt/bbb-presentation-video/bin/python -m pip install ./bbb-presentation-video -c ./bbb-presentation-video/constraints-amazonlinux-2.txt | |
virtualenv-tools --update-path /opt/bbb-presentation-video bbb-presentation-video-image/opt/bbb-presentation-video | |
mkdir -pv bbb-presentation-video-image/usr/bin | |
ln -sv /opt/bbb-presentation-video/bin/bbb-presentation-video bbb-presentation-video-image/usr/bin | |
- name: Use fpm to build rpm package | |
run: | | |
pushd bbb-presentation-video | |
eval "$(./dch_version.sh)" | |
popd | |
fpm --verbose \ | |
--name bbb-presentation-video \ | |
--input-type dir \ | |
--chdir bbb-presentation-video-image \ | |
--output-type rpm \ | |
--version "${DCH_VERSION}" \ | |
--rpm-dist amzn2 \ | |
--rpm-autoreqprov \ | |
--depends python3.8 \ | |
--depends gobject-introspection \ | |
--depends poppler-glib \ | |
--depends gdk-pixbuf2 \ | |
--depends gtk3 \ | |
--depends pango \ | |
--depends liberation-fonts \ | |
--depends ffmpeg \ | |
. | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: amazonlinux-2 | |
path: "*.rpm" | |
if-no-files-found: error | |
assets: | |
name: "Upload assets to release" | |
needs: [ ubuntu, amazonlinux-2 ] | |
runs-on: ubuntu-latest | |
if: ${{ github.ref_type == 'tag' }} | |
permissions: | |
contents: write | |
actions: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: ubuntu-20.04 | |
path: ubuntu-20.04 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: amazonlinux-2 | |
path: amazonlinux-2 | |
- name: Create release asset archives | |
run: | | |
for asset in ubuntu-20.04 amazonlinux-2 ; do | |
zip --junk-paths --recurse-paths --compression-method store "${asset}.zip" "${asset}" | |
done | |
- name: Upload release assets | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
for asset in ubuntu-20.04 amazonlinux-2 ; do | |
gh release upload ${{ github.ref_name }} "${asset}.zip" | |
done |