Update action-junit-report to v5 #168
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 | |
assets: | |
name: "Upload assets to release" | |
needs: [ ubuntu ] | |
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 | |
- name: Create release asset archives | |
run: | | |
for asset in ubuntu-20.04 ; 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 ; do | |
gh release upload ${{ github.ref_name }} "${asset}.zip" | |
done |