From 94a8b820960aba3ef3047cda404a98b4452b091f Mon Sep 17 00:00:00 2001 From: Andres Cera Date: Thu, 15 Jan 2026 07:24:53 -0500 Subject: [PATCH 1/5] feat: add CI build check and consolidate release workflows - Add build-check.yml: runs on PR/push to main, builds for arm64/amd64 - Replace publish-deb.yml and release.yml with unified publish-release.yml - CalVer versioning with stable/beta channels - Builds .deb packages and .tar.gz archives - GPG signs APT repository metadata - Uploads to Cloudflare R2 - Creates GitHub release with all artifacts and checksums --- .github/workflows/build-check.yml | 58 ++++++ .github/workflows/publish-deb.yml | 100 --------- .github/workflows/publish-release.yml | 271 ++++++++++++++++++++++++ .github/workflows/release.yml | 283 -------------------------- 4 files changed, 329 insertions(+), 383 deletions(-) create mode 100644 .github/workflows/build-check.yml delete mode 100644 .github/workflows/publish-deb.yml create mode 100644 .github/workflows/publish-release.yml delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml new file mode 100644 index 0000000..1666036 --- /dev/null +++ b/.github/workflows/build-check.yml @@ -0,0 +1,58 @@ +name: Build Check + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + name: Build ${{ matrix.arch }} + runs-on: ubuntu-latest + strategy: + matrix: + arch: [arm64, amd64] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Build ceracoder for ${{ matrix.arch }} + run: | + PLATFORM="linux/${{ matrix.arch }}" + + docker buildx build \ + --platform "$PLATFORM" \ + --load \ + -t ceracoder-builder:${{ matrix.arch }} \ + -f - . <<'DOCKERFILE' + FROM debian:bookworm-slim + RUN apt-get update && apt-get install -y \ + build-essential \ + cmake \ + git \ + libgstreamer1.0-dev \ + libgstreamer-plugins-base1.0-dev \ + libsrt-dev \ + pkg-config \ + && rm -rf /var/lib/apt/lists/* + WORKDIR /build + COPY . . + RUN cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j$(nproc) + DOCKERFILE + + - name: Verify binary was built + run: | + docker run --rm ceracoder-builder:${{ matrix.arch }} ls -la /build/build/ceracoder + + - name: Build Summary + run: | + echo "## โœ… Build Check Passed" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "**Architecture:** ${{ matrix.arch }}" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/publish-deb.yml b/.github/workflows/publish-deb.yml deleted file mode 100644 index fab38e1..0000000 --- a/.github/workflows/publish-deb.yml +++ /dev/null @@ -1,100 +0,0 @@ -name: Build and Upload Debian Package - -on: - workflow_dispatch: - inputs: - release_type: - description: "Release type" - required: true - type: choice - options: - - stable - - beta - default: stable - push: - branches: - - master - -jobs: - calculate-version: - name: Calculate Version - runs-on: ubuntu-latest - outputs: - version: ${{ steps.calver.outputs.version }} - is_beta: ${{ steps.calver.outputs.is_beta }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Calculate CalVer version - id: calver - env: - RELEASE_TYPE: ${{ github.event.inputs.release_type || 'beta' }} - run: | - YEAR=$(date -u +"%Y") - MONTH=$(date -u +"%-m") - IS_BETA=$([[ "$RELEASE_TYPE" == "beta" ]] && echo "true" || echo "false") - - PREFIX="v${YEAR}.${MONTH}" - - if [ "$IS_BETA" == "true" ]; then - LATEST_BETA=$(git tag -l "${PREFIX}.*-beta.*" | sed -E "s/.*-beta\.([0-9]+)/\1/" | sort -n | tail -1) - if [ -z "$LATEST_BETA" ]; then - BETA_NUM=1 - else - BETA_NUM=$((LATEST_BETA + 1)) - fi - LATEST_STABLE=$(git tag -l "${PREFIX}.*" | grep -v beta | sed "s/${PREFIX}\.//" | sort -n | tail -1) - PATCH=${LATEST_STABLE:-0} - NEXT_PATCH=$((PATCH + 1)) - VERSION="${YEAR}.${MONTH}.${NEXT_PATCH}-beta.${BETA_NUM}" - else - LATEST_PATCH=$(git tag -l "${PREFIX}.*" | grep -v beta | sed "s/${PREFIX}\.//" | sort -n | tail -1) - if [ -z "$LATEST_PATCH" ]; then - PATCH=0 - else - PATCH=$((LATEST_PATCH + 1)) - fi - VERSION="${YEAR}.${MONTH}.${PATCH}" - fi - - echo "version=${VERSION}" >> $GITHUB_OUTPUT - echo "is_beta=${IS_BETA}" >> $GITHUB_OUTPUT - echo "โœ… Version: ${VERSION} (Beta: ${IS_BETA})" - - deb: - name: Build Debian Package - needs: calculate-version - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - run: sudo apt update && sudo apt install -y qemu-user-static binfmt-support - - - uses: docker/build-push-action@v3 - with: - context: . - outputs: build - platforms: linux/arm64 - - - uses: jiro4989/build-deb-action@v4 - id: deb - with: - package: ceracoder - package_root: ./build - maintainer: CERALIVE - desc: "Live video encoder with dynamic bitrate control and SRT support" - version: ${{ needs.calculate-version.outputs.version }} - homepage: "https://github.com/CERALIVE/ceracoder" - arch: "arm64" - section: "video" - compress_type: zstd - - - uses: actions/upload-artifact@v4 - with: - name: ceracoder-arm64.deb - path: ${{ steps.deb.outputs.file_name }} diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 0000000..2fff7a0 --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,271 @@ +name: Publish Release + +on: + workflow_dispatch: + inputs: + release_type: + description: "Release type" + required: true + type: choice + options: + - stable + - beta + default: stable + +jobs: + calculate-version: + name: Calculate Version + runs-on: ubuntu-latest + outputs: + version: ${{ steps.calver.outputs.version }} + channel: ${{ steps.calver.outputs.channel }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Calculate CalVer version + id: calver + env: + RELEASE_TYPE: ${{ github.event.inputs.release_type || 'beta' }} + run: | + YEAR=$(date -u +"%Y") + MONTH=$(date -u +"%-m") + IS_BETA=$([[ "$RELEASE_TYPE" == "beta" ]] && echo "true" || echo "false") + + PREFIX="v${YEAR}.${MONTH}" + + if [ "$IS_BETA" == "true" ]; then + LATEST_BETA=$(git tag -l "${PREFIX}.*-beta.*" | sed -E "s/.*-beta\.([0-9]+)/\1/" | sort -n | tail -1) + if [ -z "$LATEST_BETA" ]; then + BETA_NUM=1 + else + BETA_NUM=$((LATEST_BETA + 1)) + fi + LATEST_STABLE=$(git tag -l "${PREFIX}.*" | grep -v beta | sed "s/${PREFIX}\.//" | sort -n | tail -1) + PATCH=${LATEST_STABLE:-0} + NEXT_PATCH=$((PATCH + 1)) + VERSION="${YEAR}.${MONTH}.${NEXT_PATCH}-beta.${BETA_NUM}" + CHANNEL="beta" + else + LATEST_PATCH=$(git tag -l "${PREFIX}.*" | grep -v beta | sed "s/${PREFIX}\.//" | sort -n | tail -1) + if [ -z "$LATEST_PATCH" ]; then + PATCH=0 + else + PATCH=$((LATEST_PATCH + 1)) + fi + VERSION="${YEAR}.${MONTH}.${PATCH}" + CHANNEL="stable" + fi + + echo "version=${VERSION}" >> $GITHUB_OUTPUT + echo "channel=${CHANNEL}" >> $GITHUB_OUTPUT + echo "Version: ${VERSION} (Channel: ${CHANNEL})" + + build: + name: Build (${{ matrix.arch }}) + needs: calculate-version + runs-on: ubuntu-latest + strategy: + matrix: + arch: [arm64, amd64] + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build in Docker (${{ matrix.arch }}) + run: | + mkdir -p build-output + + cat > Dockerfile.build << 'DOCKERFILE' + FROM debian:bookworm + + RUN apt-get update && apt-get install -y \ + build-essential \ + cmake \ + pkg-config \ + libgstreamer1.0-dev \ + libgstreamer-plugins-base1.0-dev \ + libsrt-dev \ + && rm -rf /var/lib/apt/lists/* + + WORKDIR /src + COPY . . + + RUN cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr + RUN cmake --build build -j$(nproc) + RUN DESTDIR=/output cmake --install build + DOCKERFILE + + docker buildx build \ + --platform linux/${{ matrix.arch }} \ + --output type=local,dest=build-output \ + -f Dockerfile.build \ + . + + - name: Install FPM + run: | + sudo apt-get update + sudo apt-get install -y ruby-dev gcc g++ + sudo gem install fpm + + - name: Create packages + env: + VERSION: ${{ needs.calculate-version.outputs.version }} + ARCH: ${{ matrix.arch }} + run: | + mkdir -p dist + + # Create .deb package + fpm -s dir -t deb \ + -n ceracoder \ + -v "${VERSION}" \ + -a "${ARCH}" \ + --description "Live video encoder with dynamic bitrate control and SRT support" \ + --maintainer "CERALIVE " \ + --url "https://github.com/CERALIVE/ceracoder" \ + --license "GPL-3.0" \ + --depends "libgstreamer1.0-0" \ + --depends "libgstreamer-plugins-base1.0-0" \ + --depends "libsrt1.5-openssl" \ + -p "dist/ceracoder_${VERSION}_${ARCH}.deb" \ + build-output/usr/=/usr/ + + # Create .tar.gz archive + mkdir -p tarball/ceracoder-${VERSION} + cp -r build-output/usr/* tarball/ceracoder-${VERSION}/ + cd tarball + tar -czvf ../dist/ceracoder_${VERSION}_${ARCH}.tar.gz ceracoder-${VERSION} + cd .. + + # Create checksums + cd dist + sha256sum ceracoder_${VERSION}_${ARCH}.deb > ceracoder_${VERSION}_${ARCH}.deb.sha256 + sha256sum ceracoder_${VERSION}_${ARCH}.tar.gz > ceracoder_${VERSION}_${ARCH}.tar.gz.sha256 + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ceracoder-${{ matrix.arch }} + path: | + dist/*.deb + dist/*.tar.gz + dist/*.sha256 + + sign-and-publish: + name: Sign and Publish to R2 + needs: [calculate-version, build] + runs-on: ubuntu-latest + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Prepare dist directory + run: | + mkdir -p dist/arm64 dist/amd64 dist/release + mv artifacts/ceracoder-arm64/*.deb dist/arm64/ + mv artifacts/ceracoder-amd64/*.deb dist/amd64/ + cp artifacts/ceracoder-arm64/*.tar.gz dist/release/ + cp artifacts/ceracoder-amd64/*.tar.gz dist/release/ + cp artifacts/ceracoder-arm64/*.sha256 dist/release/ + cp artifacts/ceracoder-amd64/*.sha256 dist/release/ + + - name: Import GPG key + run: | + echo "${{ secrets.DEB_SIGNING_KEY_B64 }}" | base64 -d | gpg --batch --import + + - name: Install apt-utils + run: sudo apt-get update && sudo apt-get install -y apt-utils + + - name: Generate and sign repo metadata (arm64) + run: | + cd dist/arm64 + dpkg-scanpackages . > Packages + gzip -k Packages + apt-ftparchive release . > Release + gpg --batch --yes -abs -o Release.gpg Release + gpg --batch --yes --clearsign -o InRelease Release + + - name: Generate and sign repo metadata (amd64) + run: | + cd dist/amd64 + dpkg-scanpackages . > Packages + gzip -k Packages + apt-ftparchive release . > Release + gpg --batch --yes -abs -o Release.gpg Release + gpg --batch --yes --clearsign -o InRelease Release + + - name: Install AWS CLI + run: | + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip -q awscliv2.zip + sudo ./aws/install + + - name: Upload to R2 + env: + R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} + R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} + R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }} + R2_BUCKET: ${{ secrets.R2_BUCKET }} + CHANNEL: ${{ needs.calculate-version.outputs.channel }} + run: | + aws configure set aws_access_key_id "$R2_ACCESS_KEY_ID" + aws configure set aws_secret_access_key "$R2_SECRET_ACCESS_KEY" + + aws s3 sync dist/arm64/ "s3://$R2_BUCKET/dists/$CHANNEL/binary-arm64/" \ + --endpoint-url "$R2_ENDPOINT" + aws s3 sync dist/amd64/ "s3://$R2_BUCKET/dists/$CHANNEL/binary-amd64/" \ + --endpoint-url "$R2_ENDPOINT" + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: v${{ needs.calculate-version.outputs.version }} + name: ceracoder v${{ needs.calculate-version.outputs.version }} + prerelease: ${{ needs.calculate-version.outputs.channel == 'beta' }} + files: | + dist/arm64/*.deb + dist/amd64/*.deb + dist/release/*.tar.gz + dist/release/*.sha256 + body: | + ## ceracoder v${{ needs.calculate-version.outputs.version }} + + Live video encoder with dynamic bitrate control and SRT support. + + ### Debian Packages + | Architecture | Package | + |--------------|---------| + | ARM64 | `ceracoder_${{ needs.calculate-version.outputs.version }}_arm64.deb` | + | AMD64 | `ceracoder_${{ needs.calculate-version.outputs.version }}_amd64.deb` | + + ### Binary Archives + | Architecture | Archive | + |--------------|---------| + | ARM64 | `ceracoder_${{ needs.calculate-version.outputs.version }}_arm64.tar.gz` | + | AMD64 | `ceracoder_${{ needs.calculate-version.outputs.version }}_amd64.tar.gz` | + + ### Installation + + **Debian/Ubuntu:** + ```bash + sudo dpkg -i ceracoder_${{ needs.calculate-version.outputs.version }}_.deb + sudo apt-get install -f # Install dependencies + ``` + + **Manual:** + ```bash + tar -xzf ceracoder_${{ needs.calculate-version.outputs.version }}_.tar.gz + sudo cp -r ceracoder-${{ needs.calculate-version.outputs.version }}/* /usr/ + ``` diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index e6b0c96..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,283 +0,0 @@ -name: Build and Release Ceracoder - -on: - workflow_dispatch: - inputs: - release_type: - description: "Release type" - required: true - type: choice - options: - - stable - - beta - default: stable - release_notes: - description: "Release notes (what changed in this release)" - required: false - type: string - force_version: - description: "Override auto-detected version (optional, e.g., 2026.1.0)" - required: false - type: string - -permissions: - contents: write - -jobs: - version: - name: Calculate Version - runs-on: ubuntu-latest - outputs: - version: ${{ steps.calver.outputs.version }} - version_tag: ${{ steps.calver.outputs.version_tag }} - is_beta: ${{ steps.calver.outputs.is_beta }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Calculate CalVer version with beta support - id: calver - env: - RELEASE_TYPE: ${{ github.event.inputs.release_type }} - FORCE_VERSION: ${{ github.event.inputs.force_version }} - run: | - # Get current year and month (no leading zeros for month) - YEAR=$(date -u +"%Y") - MONTH=$(date -u +"%-m") # %-m removes leading zero - IS_BETA=$([[ "$RELEASE_TYPE" == "beta" ]] && echo "true" || echo "false") - - # Check if force_version is provided - if [ -n "$FORCE_VERSION" ]; then - VERSION="$FORCE_VERSION" - echo "๐Ÿ“Œ Using forced version: $VERSION" - else - # Find existing tags for this year.month - PREFIX="v${YEAR}.${MONTH}" - - if [ "$IS_BETA" == "true" ]; then - # For beta: find highest beta number for this month - LATEST_BETA=$(git tag -l "${PREFIX}.*-beta.*" | sed -E "s/.*-beta\.([0-9]+)/\1/" | sort -n | tail -1) - - if [ -z "$LATEST_BETA" ]; then - BETA_NUM=1 - echo "๐Ÿงช First beta of ${YEAR}.${MONTH}" - else - BETA_NUM=$((LATEST_BETA + 1)) - echo "๐Ÿ”„ Incrementing beta: ${LATEST_BETA} โ†’ ${BETA_NUM}" - fi - - # Get the base patch (latest stable or 0) - LATEST_STABLE=$(git tag -l "${PREFIX}.*" | grep -v beta | sed "s/${PREFIX}\.//" | sort -n | tail -1) - PATCH=${LATEST_STABLE:-0} - NEXT_PATCH=$((PATCH + 1)) - - VERSION="${YEAR}.${MONTH}.${NEXT_PATCH}-beta.${BETA_NUM}" - else - # For stable: find highest patch number (excluding betas) - LATEST_PATCH=$(git tag -l "${PREFIX}.*" | grep -v beta | sed "s/${PREFIX}\.//" | sort -n | tail -1) - - if [ -z "$LATEST_PATCH" ]; then - PATCH=0 - echo "๐Ÿ“… First release of ${YEAR}.${MONTH}" - else - PATCH=$((LATEST_PATCH + 1)) - echo "๐Ÿ”„ Incrementing patch: ${LATEST_PATCH} โ†’ ${PATCH}" - fi - - VERSION="${YEAR}.${MONTH}.${PATCH}" - fi - fi - - VERSION_TAG="v${VERSION}" - - echo "version=${VERSION}" >> $GITHUB_OUTPUT - echo "version_tag=${VERSION_TAG}" >> $GITHUB_OUTPUT - echo "is_beta=${IS_BETA}" >> $GITHUB_OUTPUT - - echo "โœ… Next version: ${VERSION}" - echo "๐Ÿท๏ธ Tag: ${VERSION_TAG}" - echo "๐Ÿงช Beta: ${IS_BETA}" - - - name: Version Summary - run: | - echo "## ๐Ÿท๏ธ Version Calculated" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Version:** \`${{ steps.calver.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY - echo "**Tag:** \`${{ steps.calver.outputs.version_tag }}\`" >> $GITHUB_STEP_SUMMARY - echo "**Type:** ${{ steps.calver.outputs.is_beta == 'true' && '๐Ÿงช Beta' || 'โœ… Stable' }}" >> $GITHUB_STEP_SUMMARY - - build-release: - name: Build ${{ matrix.arch }} - runs-on: ubuntu-latest - needs: version - strategy: - matrix: - include: - - arch: x86_64 - platform: linux/amd64 - artifact_name: ceracoder-linux-x86_64 - - arch: arm64 - platform: linux/arm64 - artifact_name: ceracoder-linux-arm64 - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Set up QEMU for cross-platform builds - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build ceracoder binary - uses: docker/build-push-action@v5 - with: - context: . - platforms: ${{ matrix.platform }} - outputs: type=local,dest=./build - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Prepare artifact - run: | - mkdir -p artifacts - cp build/usr/bin/ceracoder artifacts/ceracoder - chmod +x artifacts/ceracoder - cd artifacts - tar -czf ${{ matrix.artifact_name }}-v${{ needs.version.outputs.version }}.tar.gz ceracoder - sha256sum ${{ matrix.artifact_name }}-v${{ needs.version.outputs.version }}.tar.gz > ${{ matrix.artifact_name }}-v${{ needs.version.outputs.version }}.tar.gz.sha256 - # Also create unversioned symlink for convenience - ln -s ${{ matrix.artifact_name }}-v${{ needs.version.outputs.version }}.tar.gz ${{ matrix.artifact_name }}.tar.gz - - - name: Upload build artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.artifact_name }} - path: | - artifacts/${{ matrix.artifact_name }}.tar.gz - artifacts/${{ matrix.artifact_name }}.tar.gz.sha256 - - create-release: - name: Create Release - needs: [version, build-release] - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Download all artifacts - uses: actions/download-artifact@v4 - with: - path: release-artifacts - - - name: Prepare release assets - run: | - mkdir -p release-files - find release-artifacts -type f \( -name '*.tar.gz' -o -name '*.sha256' \) -exec cp {} release-files/ \; - ls -lh release-files/ - - - name: Generate release body - env: - VERSION: ${{ needs.version.outputs.version }} - VERSION_TAG: ${{ needs.version.outputs.version_tag }} - IS_BETA: ${{ needs.version.outputs.is_beta }} - RELEASE_NOTES: ${{ github.event.inputs.release_notes }} - run: | - # Get the previous tag for changelog - PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") - - # Generate changelog - if [ -n "$PREV_TAG" ]; then - CHANGELOG_HEADER="Changes since ${PREV_TAG}:" - CHANGELOG=$(git log ${PREV_TAG}..HEAD --pretty=format:"- %s" --no-merges | head -20) - else - CHANGELOG_HEADER="Recent commits:" - CHANGELOG=$(git log --pretty=format:"- %s" --no-merges -20) - fi - - DATE=$(date -u +"%Y-%m-%d") - - # Build release body - { - echo "# Ceracoder ${VERSION_TAG}" - echo "" - if [ "$IS_BETA" == "true" ]; then - echo "> โš ๏ธ **This is a beta release.** It may contain bugs or incomplete features. Use in production at your own risk." - echo "" - fi - echo "**Release Date:** ${DATE}" - echo "" - echo "## ๐Ÿ“ฆ Downloads" - echo "" - echo "| Architecture | File |" - echo "|--------------|------|" - echo "| x86_64 (amd64) | \`ceracoder-linux-x86_64-v${VERSION}.tar.gz\` |" - echo "| ARM64 | \`ceracoder-linux-arm64-v${VERSION}.tar.gz\` |" - echo "" - echo "SHA256 checksums are provided for verification." - echo "" - echo "## ๐Ÿ“ Installation" - echo "" - echo "\`\`\`bash" - echo "# Download and extract" - echo "tar -xzf ceracoder-linux-*.tar.gz" - echo "sudo mv ceracoder /usr/local/bin/" - echo "" - echo "# Verify installation" - echo "ceracoder -v" - echo "\`\`\`" - echo "" - echo "## ๐Ÿ“‹ Release Notes" - echo "" - echo "${RELEASE_NOTES:-No release notes provided.}" - echo "" - echo "## ๐Ÿ”„ What's Changed" - echo "" - echo "${CHANGELOG_HEADER}" - echo "" - echo "${CHANGELOG}" - echo "" - echo "---" - echo "" - echo "**Ceracoder** is a fork of [irlserver/belacoder](https://github.com/irlserver/belacoder), itself a fork of [BELABOX/belacoder](https://github.com/BELABOX/belacoder)." - echo "" - echo "๐Ÿค– Built with GitHub Actions using CalVer (YYYY.M.patch) versioning" - } > release-body.md - - echo "๐Ÿ“„ Generated release body:" - cat release-body.md - - - name: Create Release - uses: softprops/action-gh-release@v1 - with: - tag_name: ${{ needs.version.outputs.version_tag }} - name: Ceracoder ${{ needs.version.outputs.version_tag }}${{ needs.version.outputs.is_beta == 'true' && ' (Beta)' || '' }} - body_path: release-body.md - files: release-files/* - draft: false - prerelease: ${{ needs.version.outputs.is_beta == 'true' }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Release Summary - run: | - echo "## ๐ŸŽ‰ Release Created!" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Version:** \`${{ needs.version.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY - echo "**Tag:** \`${{ needs.version.outputs.version_tag }}\`" >> $GITHUB_STEP_SUMMARY - echo "**Type:** ${{ needs.version.outputs.is_beta == 'true' && '๐Ÿงช Beta (Pre-release)' || 'โœ… Stable' }}" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Assets Uploaded:" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - ls -1 release-files/ | while read f; do echo "- \`$f\`" >> $GITHUB_STEP_SUMMARY; done - echo "" >> $GITHUB_STEP_SUMMARY - echo "๐Ÿ”— [View Release](https://github.com/${{ github.repository }}/releases/tag/${{ needs.version.outputs.version_tag }})" >> $GITHUB_STEP_SUMMARY From 9b0fa9d3e2d33686de3ce375ed35d26dc80d3a8e Mon Sep 17 00:00:00 2001 From: Andres Cera Date: Thu, 15 Jan 2026 07:44:39 -0500 Subject: [PATCH 2/5] fix: build SRT from source for build-check (libsrt-dev is our own package) --- .github/workflows/build-check.yml | 45 ++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 1666036..7c2e576 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -14,8 +14,16 @@ jobs: matrix: arch: [arm64, amd64] steps: - - name: Checkout code + - name: Checkout ceracoder uses: actions/checkout@v4 + with: + path: ceracoder + + - name: Checkout SRT (dependency) + uses: actions/checkout@v4 + with: + repository: CERALIVE/srt + path: srt - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -27,11 +35,36 @@ jobs: run: | PLATFORM="linux/${{ matrix.arch }}" + # Create a combined context with both repos + mkdir -p build-context + cp -r srt build-context/ + cp -r ceracoder build-context/ + docker buildx build \ --platform "$PLATFORM" \ --load \ -t ceracoder-builder:${{ matrix.arch }} \ - -f - . <<'DOCKERFILE' + -f - build-context <<'DOCKERFILE' + FROM debian:bookworm-slim AS srt-builder + RUN apt-get update && apt-get install -y \ + build-essential \ + cmake \ + git \ + libssl-dev \ + pkg-config \ + tclsh \ + && rm -rf /var/lib/apt/lists/* + WORKDIR /srt + COPY srt/ . + RUN cmake -B build \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DENABLE_APPS=OFF \ + -DENABLE_BONDING=ON \ + -DENABLE_ENCRYPTION=ON \ + && cmake --build build -j$(nproc) \ + && cmake --install build + FROM debian:bookworm-slim RUN apt-get update && apt-get install -y \ build-essential \ @@ -39,11 +72,15 @@ jobs: git \ libgstreamer1.0-dev \ libgstreamer-plugins-base1.0-dev \ - libsrt-dev \ + libssl-dev \ pkg-config \ && rm -rf /var/lib/apt/lists/* + COPY --from=srt-builder /usr/include/srt /usr/include/srt + COPY --from=srt-builder /usr/lib/*-linux-gnu*/libsrt* /usr/lib/ + COPY --from=srt-builder /usr/lib/*-linux-gnu*/pkgconfig/srt.pc /usr/lib/pkgconfig/ + RUN ldconfig WORKDIR /build - COPY . . + COPY ceracoder/ . RUN cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j$(nproc) DOCKERFILE From 17a3e723220690a96ca95e4163613d0b01cef3cd Mon Sep 17 00:00:00 2001 From: Andres Cera Date: Thu, 15 Jan 2026 07:49:40 -0500 Subject: [PATCH 3/5] fix: use Makefile instead of CMake for build-check --- .github/workflows/build-check.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 7c2e576..b806451 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -18,6 +18,7 @@ jobs: uses: actions/checkout@v4 with: path: ceracoder + submodules: recursive - name: Checkout SRT (dependency) uses: actions/checkout@v4 @@ -68,10 +69,10 @@ jobs: FROM debian:bookworm-slim RUN apt-get update && apt-get install -y \ build-essential \ - cmake \ git \ libgstreamer1.0-dev \ libgstreamer-plugins-base1.0-dev \ + gstreamer1.0-plugins-base \ libssl-dev \ pkg-config \ && rm -rf /var/lib/apt/lists/* @@ -81,12 +82,12 @@ jobs: RUN ldconfig WORKDIR /build COPY ceracoder/ . - RUN cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j$(nproc) + RUN make ceracoder DOCKERFILE - name: Verify binary was built run: | - docker run --rm ceracoder-builder:${{ matrix.arch }} ls -la /build/build/ceracoder + docker run --rm ceracoder-builder:${{ matrix.arch }} ls -la /build/ceracoder - name: Build Summary run: | From 3c68123e2dc24f3aa225a6464270142a82df54fb Mon Sep 17 00:00:00 2001 From: Andres Cera Date: Thu, 15 Jan 2026 14:47:32 -0500 Subject: [PATCH 4/5] feat: add srtla and gstlibuvch264src as dependencies --- .github/workflows/publish-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 2fff7a0..430555b 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -134,9 +134,10 @@ jobs: --maintainer "CERALIVE " \ --url "https://github.com/CERALIVE/ceracoder" \ --license "GPL-3.0" \ + --depends "srtla" \ + --depends "gstlibuvch264src" \ --depends "libgstreamer1.0-0" \ --depends "libgstreamer-plugins-base1.0-0" \ - --depends "libsrt1.5-openssl" \ -p "dist/ceracoder_${VERSION}_${ARCH}.deb" \ build-output/usr/=/usr/ From a250205016f740bbc3590d6ec0985338c4fc439e Mon Sep 17 00:00:00 2001 From: Andres Cera Date: Thu, 15 Jan 2026 14:53:29 -0500 Subject: [PATCH 5/5] docs: add dependency chain to release notes --- .github/workflows/publish-release.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 430555b..336837a 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -245,6 +245,19 @@ jobs: Live video encoder with dynamic bitrate control and SRT support. + ### Dependency Chain + ``` + srt + โ””โ”€โ”€ srtla + โ””โ”€โ”€ ceracoder (this package) + โ”œโ”€โ”€ Depends: srtla, gstlibuvch264src + โ”œโ”€โ”€ Depends: libgstreamer1.0-0, libgstreamer-plugins-base1.0-0 + โ”‚ + โ””โ”€โ”€ Used by: ceralive-device + + gstlibuvch264src โ”€โ”€โ”˜ + ``` + ### Debian Packages | Architecture | Package | |--------------|---------|