Skip to content

Add Debian configuration. #45

Add Debian configuration.

Add Debian configuration. #45

Workflow file for this run

---
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 }}