-
-
Notifications
You must be signed in to change notification settings - Fork 3
123 lines (105 loc) · 3.7 KB
/
build.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Build
on:
push:
tags:
- "v*"
jobs:
build-ubuntu-2404:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Build Debian Package
uses: jtdor/build-deb-action@v1
env:
DEB_BUILD_OPTIONS: noautodbgsym
with:
docker-image: ubuntu:24.04
buildpackage-opts: -us -uc
before-build-hook: apt-get install -y devscripts equivs && mk-build-deps --install --remove debian/control && debchange --controlmaint --local="+ci${{ github.run_id }}~ubuntu2404~git$(git rev-parse --short HEAD)" "CI build"
extra-build-deps: devscripts git equivs debhelper build-essential
host-arch: amd64
artifacts-dir: debian/artifacts-ubuntu2404
- name: Upload Debian Package
uses: actions/upload-artifact@v4
with:
name: debian-package-ubuntu2404
path: debian/artifacts-ubuntu2404/*.deb
build-ubuntu-2204:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Build Debian Package
uses: jtdor/build-deb-action@v1
env:
DEB_BUILD_OPTIONS: noautodbgsym
with:
docker-image: ubuntu:22.04
buildpackage-opts: -us -uc
before-build-hook: apt-get install -y devscripts equivs && mk-build-deps --install --remove debian/control && debchange --controlmaint --local="+ci${{ github.run_id }}~ubuntu2204~git$(git rev-parse --short HEAD)" "CI build"
extra-build-deps: devscripts git equivs debhelper build-essential
host-arch: amd64
artifacts-dir: debian/artifacts-ubuntu2204
- name: Upload Debian Package
uses: actions/upload-artifact@v4
with:
name: debian-package-ubuntu2204
path: debian/artifacts-ubuntu2204/*.deb
generate-changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
includeInvalidCommits: true
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
- name: Release Changelog Builder
id: release_changelog
uses: mikepenz/release-changelog-builder-action@v5
with:
configurationJson: |
{
"template": "#{{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n#{{UNCATEGORIZED}}\n</details>",
"categories": [
{
"title": "## 💬 Other",
"labels": ["other"]
},
{
"title": "## 📦 Dependencies",
"labels": ["dependencies"]
}
]
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
needs: [build-ubuntu-2404, build-ubuntu-2204, generate-changelog]
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Download build artifacts for Ubuntu 24.04
uses: actions/download-artifact@v4
with:
name: debian-package-ubuntu2404
path: .
- name: Download build artifacts for Ubuntu 22.04
uses: actions/download-artifact@v4
with:
name: debian-package-ubuntu2204
path: .
- run: ls -R .
- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: ./*.deb
body: ${{ steps.changelog.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}