Skip to content

Commit ca29162

Browse files
committed
feat: add deb builds
1 parent c044a99 commit ca29162

5 files changed

Lines changed: 51 additions & 65 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
submodules: recursive
15+
- run: sudo apt update
16+
- run: sudo apt install -y clang libelf-dev libconfig-dev llvm
17+
- run: make
18+
- name: Set package version
19+
run: |
20+
VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))
21+
sed -i "s/v0.0.0/$VERSION/" nfpm.yml
22+
- name: Build package
23+
run: nfpm package --packager deb --config nfpm.yml
24+
- name: Release
25+
uses: softprops/action-gh-release@v1
26+
if: startsWith(github.ref, 'refs/tags/')
27+
with:
28+
files: xdpfw_*_amd64.deb

.github/workflows/run.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea
2+
build

nfpm.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "xdpfw"
2+
arch: "amd64"
3+
platform: "linux"
4+
version: "v0.0.0"
5+
section: "default"
6+
priority: "extra"
7+
maintainer: "Nate Sales <nate@packetframe.com>"
8+
description: "XDP Firewall"
9+
vendor: "Packetframe"
10+
homepage: "https://github.com/packetframe/XDP-Firewall"
11+
license: ""
12+
contents:
13+
- src: ./build/xdpfw
14+
dst: /usr/local/bin/xdpfw
15+
- src: ./build/xdpfw_kern.o
16+
dst: /etc/xdpfw/xdpfw_kern.o
17+
- src: ./other/xdpfw.service
18+
dst: /etc/systemd/system/xdpfw.service
19+
- src: ./xdpfw.conf.example
20+
dst: /etc/xdpfw/xdpfw.conf
21+
type: config

0 commit comments

Comments
 (0)