[CI/CD] Added GH Workflows
Some checks failed
Build and Release CI / release-ci (push) Has been cancelled
Build and Release CI / build-fedora (push) Has been cancelled

---------

Signed-off-by: Leonardo Amaral <contato@leonardoamaral.com.br>
Co-authored-by: Leonardo Amaral <contato@leonardoamaral.com.br>

[CI/CD] Added GH Workflows
This commit is contained in:
Christian Tosta
2025-04-22 16:42:48 -03:00
committed by Christian Tosta
parent 3df218f8e7
commit 0683dbbed8
5 changed files with 269 additions and 0 deletions

70
.github/workflows/fedora.yml vendored Normal file
View File

@@ -0,0 +1,70 @@
on:
workflow_call:
inputs:
containers:
default: "['fedora:latest']"
required: false
type: string
tag:
required: true
type: string
to_release:
default: "0"
required: false
type: string
version:
required: true
type: string
defaults:
run:
shell: bash
jobs:
build:
strategy:
max-parallel: 2
matrix:
image: ${{ fromJson(inputs.containers) }}
runs-on: ubuntu-latest
container: ${{ matrix.image }}
steps:
- name: Prepare - local checkout
uses: actions/checkout@v4
- name: Prepare - install build dependencies
run: |
dnf -y install \
cmake \
gcc \
gcc-c++ \
git \
openssl \
rpm-build \
rpmdevtools \
tar
- name: Prepare - setup RPM build tree
run: |
rpmdev-setuptree
- name: Prepare - configure the source
run: |
cmake -B $(pwd)/build -S $(pwd)
- name: Build - create source tarball and SRPM package
run: |
cmake --build $(pwd)/build --target srpm
- name: Build - create RPM package
run: |
cmake --build $(pwd)/build --target rpms
- name: Publish - create GitHub release
uses: softprops/action-gh-release@v2
if: inputs.to_release == 1
with:
tag_name: ${{ inputs.tag }}
files: |
dist/*.rpm