-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 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
name: Build and Release DEB Package
on:
push:
tags:
- 'v*' # Trigger on new tags starting with 'v'
jobs:
build_and_release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y dpkg-dev
- name: Build DEB package
run: dpkg-deb --build nagios-plugins-ets-1.4
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Ensure this token has the right permissions
with:
tag_name: ${{ github.ref }} # Tag that triggered the workflow
release_name: Release ${{ github.ref }} # Name of the release
draft: false
prerelease: false
- name: Upload DEB package to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Ensure this token has the right permissions
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # Upload URL from the create release step
asset_path: ./nagios-plugins-ets-1.4.deb # Path to the DEB package
asset_name: nagios-plugins-ets-1.4.deb # Name of the asset
asset_content_type: application/vnd.debian.binary-package # Content type