Skip to content

Commit 2855cf4

Browse files
committed
Added Github workflow
1 parent d430f4e commit 2855cf4

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/deb.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build .deb
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write # necessário para criar/atualizar Releases
11+
12+
jobs:
13+
build-deb:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0 # garante acesso às tags
20+
21+
- name: Install build tooling
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y build-essential debhelper devscripts fakeroot
25+
26+
- name: Symlink debian directory
27+
run: |
28+
if [ ! -e debian ]; then
29+
ln -s host-agent/pkg/debian debian
30+
fi
31+
ls -l debian
32+
33+
- name: Build package
34+
run: |
35+
dpkg-buildpackage -us -uc
36+
37+
- name: Upload .deb artifacts
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: debs
41+
path: ../*.deb
42+
43+
- name: Attach to GitHub Release
44+
if: startsWith(github.ref, 'refs/tags/')
45+
uses: softprops/action-gh-release@v2
46+
with:
47+
files: ../*.deb
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

debian

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
host-agent/pkg/debian

0 commit comments

Comments
 (0)