name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
release:
strategy:
matrix:
os:
- ubuntu-24.04
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Verify and store version number
id: store-version
run: |
version=$(cat Cargo.toml | grep -m 1 version | sed -e 's/version = "\(.*\)"/\1/')
pushed_version=$(echo | sed -e 's/v//')
[ v${version} = ${{ github.ref_name }} ]
echo "version=${version}" >> "$GITHUB_OUTPUT"
- name: Build
run: |
cmake -DCMAKE_BUILD_TYPE=Release -S runtime -B build
cmake --build build
sudo cpack -C build/CPackSourceConfig.cmake --config build/CPackConfig.cmake -G DEB
sudo cpack -C build/CPackSourceConfig.cmake --config build/CPackConfig.cmake -G TGZ
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
liboonta_runtime-${{ steps.store-version.outputs.version }}-Linux.deb
liboonta_runtime-${{ steps.store-version.outputs.version }}-Linux.tar.gz