-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.39 KB
/
build-deb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: release
on:
push:
permissions:
contents: write
packages: write
jobs:
deb-release:
name: Create DEB release
runs-on: ubuntu-latest
steps:
- name: Checkout actions
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set DEB_VERSION
run: |
echo "DEB_VERSION=$(echo ${{ github.ref_name }} | cut -c 2- | sed 's/-/~/g')" >> $GITHUB_ENV
- name: Print DEB_VERSION
run: |
echo DEB_VERSION=$DEB_VERSION
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential devscripts debhelper dh-make
- name: Prepare DEB build directory
run: |
mkdir -p ~/debbuild/nagios-plugins-ets-${{ env.DEB_VERSION }}
cp -r ./* ~/debbuild/nagios-plugins-ets-${{ env.DEB_VERSION }}
cd ~/debbuild/nagios-plugins-ets-${{ env.DEB_VERSION }}
dpkg-deb --build . ../nagios-plugins-ets_${{ env.DEB_VERSION }}.deb
- name: Print DEB Package
run: |
ls -al ~/debbuild/
- name: Release DEB
uses: softprops/action-gh-release@v1
with:
files: ~/debbuild/nagios-plugins-ets_${{ env.DEB_VERSION }}.deb
generate_release_notes: true
token: ${{ secrets.GITHUB_TOKEN }}