-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (51 loc) · 1.69 KB
/
package.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
name: Linux packages
on: [push, pull_request]
env:
PACKAGE_NAME: libpcut
PACKAGE_MAINTAINER: vhotspur
PACKAGE_SUMMARY: "Plain C unit testing framework"
PACKAGE_VERSION: 0.0.1
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Select compiler and build type
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release --install-prefix=/usr
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Prepare install for Debian
env:
DESTDIR: ${{github.workspace}}/pkg-deb
run: cmake --install ${{github.workspace}}/build
- name: Prepare install for RPM
env:
DESTDIR: ${{github.workspace}}/pkg-rpm
run: cmake --install ${{github.workspace}}/build
- uses: jiro4989/build-deb-action@v3
with:
package_root: ${{github.workspace}}/pkg-deb
package: ${{ env.PACKAGE_NAME }}
maintainer: ${{ env.PACKAGE_MAINTAINER }}
desc: '${{ env.PACKAGE_SUMMARY }}'
version: '${{ env.PACKAGE_VERSION }}'
arch: 'amd64'
- uses: actions/upload-artifact@v3
with:
name: deb-package
path: |
./*.deb
- uses: jiro4989/build-rpm-action@v2
with:
package_root: ${{github.workspace}}/pkg-rpm
package: ${{ env.PACKAGE_NAME }}
maintainer: ${{ env.PACKAGE_MAINTAINER }}
summary: '${{ env.PACKAGE_SUMMARY }}'
version: '${{ env.PACKAGE_VERSION }}'
arch: 'x86_64'
- uses: actions/upload-artifact@v3
with:
name: rpm-package
path: |
./*.rpm