-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (61 loc) · 1.7 KB
/
mclip.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
---
name: mclip
on: push
permissions:
contents: write
jobs:
# Lint
cppcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install
run: sudo apt install -y cppcheck
- name: Cppcheck
run: cppcheck ${GITHUB_WORKSPACE}/src/*.c
cpplint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install
run: sudo apt install -y cpplint
- name: Cpplint
run: cpplint ${GITHUB_WORKSPACE}/src/*.c
# Build
build:
needs: [cppcheck, cpplint]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Autoreconf
run: autoreconf --install
- name: Configure
run: ./configure
- name: Make
run: make
- name: Make dist
run: make dist
- name: Debian package
run: |
sudo apt-get install -y devscripts debhelper
mkdir -p "${RUNNER_TEMP}/debian-packaging"
cp mclip-*.tar.gz "${RUNNER_TEMP}/debian-packaging"
cd "${RUNNER_TEMP}/debian-packaging"
ORIG_TAR_GZ=$(ls mclip-*.gz | sed -E 's/^mclip-([[:digit:]])\.([[:digit:]])\.([[:digit:]])\.tar\.gz$/mclip_\1.\2.\3\.orig\.tar\.gz/g')
mv mclip-*.tar.gz "${ORIG_TAR_GZ}"
tar xf "${ORIG_TAR_GZ}"
cd mclip-*/
cp -R "${GITHUB_WORKSPACE}/debian" .
debuild -us -uc
- name: Upload
uses: actions/upload-artifact@v3
with:
name: mclip
path: src/mclip
- name: Release
uses: cycjimmy/semantic-release-action@v4
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}