-
Notifications
You must be signed in to change notification settings - Fork 127
58 lines (47 loc) · 1.52 KB
/
build-debian.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
51
52
53
54
55
56
57
58
name: Build and Upload Debian Package
on:
push:
tags:
- '*' # This will trigger the workflow for any tag that starts with any character
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install build dependencies
run: |
export PYTHON=python3
python3 -V
curl -sSL https://install.python-poetry.org | python3 -
export PATH=$HOME/.local/bin:$PATH
sudo apt-get update
sudo apt-get install -y build-essential debhelper dh-python python3-all pybuild-plugin-pyproject
- name: Clean before build
run: |
fakeroot debian/rules clean
- name: Prepare orig.tar.gz
run: |
cd ..
tar czf okadminfinder_${{ github.ref_name }}.orig.tar.gz okadminfinder
ls -ll
- name: Build Debian package
run: |
dpkg-buildpackage -rfakeroot -uc -us
- name: Copy Debian package to working directory
run: |
mkdir builds
cp ../okadminfinder_* builds/
- name: List files in builds directory
run: |
ls -ll builds/ # Verify files are present
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
builds/okadminfinder_${{ github.ref_name }}-1_all.deb