-
Notifications
You must be signed in to change notification settings - Fork 11
91 lines (74 loc) · 1.67 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
name: Build openfec
on:
workflow_dispatch:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * 1'
jobs:
build:
strategy:
matrix:
image: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.image }}
name: ${{ matrix.image }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: CMake
run: |
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
- name: Make
run: |
cd build
make -j2
- name: Make test
run: |
cd build
make test
- name: Make install
run: |
cd build
make DESTDIR=../dist install
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Version
id: ver
run: |
echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Debian package
id: deb
uses: gavv/debianise@HEAD
with:
image: debian:stable
package: openfec
create_changelog: true
install_build_depends: true
- name: Publish
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ steps.deb.outputs.files }}
name: ${{ steps.ver.outputs.GIT_TAG }}
tag_name: ${{ steps.ver.outputs.GIT_TAG }}
fail_on_unmatched_files: true
draft: true
prerelease: true