-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (65 loc) · 2.03 KB
/
build_and_release.yml
File metadata and controls
75 lines (65 loc) · 2.03 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build and Release Debian Package
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build_and_release:
name: Build and Release Debian Package
runs-on: ubuntu-24.04-arm
permissions:
contents: write
steps:
- name: Fix Git Permissions
run: |
mkdir -p ~/.config/git
chmod -R 700 ~/.config
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
debhelper \
devscripts \
cmake \
pkg-config \
libdrm-dev \
libx11-dev \
libx11-xcb-dev \
libxcb1-dev \
libxcb-dri3-dev \
libxcb-randr0-dev \
libxcb-shm0-dev \
libxcb-sync-dev \
libxrandr-dev \
libvulkan-dev \
libwayland-bin \
libwayland-client0 \
libwayland-dev \
wayland-protocols
sudo apt-get clean autoclean --yes
sudo apt-get autoremove --yes
sudo rm -rf /var/cache/apt/archives* /var/lib/apt/lists/*
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Debian package
run: |
debuild -us -uc -b && cp -a ../*.deb ./
- name: Get version
id: get_version
run: |
echo "version=$(dpkg-parsechangelog --show-field Version)" >> $GITHUB_OUTPUT
- name: Get commit hash
id: get_commit_hash
uses: prompt/actions-commit-hash@v3
- name: Release
uses: softprops/action-gh-release@v1
with:
name: v${{ steps.get_version.outputs.version }}-${{ steps.get_commit_hash.outputs.short }}
tag_name: v${{ steps.get_version.outputs.version }}-${{ steps.get_commit_hash.outputs.short }}
generate_release_notes: true
files: |
./*.deb