Build openfec #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |