Skip to content

Update build-deb.yml #56

Update build-deb.yml

Update build-deb.yml #56

Workflow file for this run

name: Build and Release DEB Package
on:
push:
jobs:
deb-release:
name: Create DEB release
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Get Version from control file
id: get_version
run: |
VERSION=$(grep -Eo "^Version: .+" debian/control | awk '{print $2}')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "The extracted version is: $VERSION"
- name: Install debuild
run: |
sudo apt-get update
sudo apt-get install -y \
dpkg-dev \
devscripts \
build-essential \
lintian \
debhelper
- name: Download the source tarball
run: |
wget -O ../nagios-plugins-ets_${VERSION}.orig.tar.gz https://github.com/ucsd-ets/nagios-plugins-ets/archive/refs/tags/1.2.tar.gz
tar zxvf ../nagios-plugins-ets_${VERSION}.orig.tar.gz --strip-components=1
- name: Build DEB package
run: |
debuild -us -uc
cp ../nagios-plugins-ets_amd64.deb nagios-plugins-ets_${VERSION}_amd64.deb
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: nagios-plugins-ets_${VERSION}_amd64.deb
path: |
nagios-plugins-ets_${VERSION}_amd64.deb