mirror of
https://github.com/tkmxqrdxddd/davinci-video-converter
synced 2026-03-29 15:25:33 +02:00
feat: enhance CI/CD pipeline with comprehensive workflows
- Fix ci.yml to create test input file before running tests - Add build-deb.yml for DEB package building on releases - Add ci-cd.yml for comprehensive CI/CD pipeline - Add security.yml for code security scanning - Add release.yml for dedicated release builds
This commit is contained in:
100
.github/workflows/build-deb.yml
vendored
Normal file
100
.github/workflows/build-deb.yml
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
name: Build DEB Package
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build-deb:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [amd64, arm64]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential ffmpeg devscripts debhelper
|
||||
|
||||
- name: Build
|
||||
run: make
|
||||
|
||||
- name: Create test input file
|
||||
run: |
|
||||
mkdir -p tests
|
||||
ffmpeg -f lavfi -i testsrc=duration=1:size=128x72:rate=1 -c:v libx264 -t 1 tests/input.mp4 -y 2>/dev/null || touch tests/input.mp4
|
||||
|
||||
- name: Run Tests
|
||||
run: make test
|
||||
|
||||
- name: Create DEB directory structure
|
||||
run: |
|
||||
mkdir -p debian/DEBIAN
|
||||
mkdir -p debian/usr/bin
|
||||
mkdir -p debian/usr/share/doc/davinci-video-converter
|
||||
|
||||
- name: Create control file
|
||||
run: |
|
||||
cat > debian/DEBIAN/control << EOF
|
||||
Package: davinci-video-converter
|
||||
Version: $(echo ${GITHUB_REF#refs/tags/} | sed 's/^v//')
|
||||
Section: video
|
||||
Priority: optional
|
||||
Architecture: ${{ matrix.arch }}
|
||||
Maintainer: Developer <developer@example.com>
|
||||
Description: DaVinci Video Converter
|
||||
A command-line video conversion tool optimized for DaVinci Resolve workflows.
|
||||
Supports various codecs (H.264, H.265, ProRes) with quality presets.
|
||||
Depends: ffmpeg (>= 4.0), libc6 (>= 2.28)
|
||||
EOF
|
||||
|
||||
- name: Copy binary and documentation
|
||||
run: |
|
||||
cp davinci-video-converter debian/usr/bin/
|
||||
cp README.md debian/usr/share/doc/davinci-video-converter/
|
||||
cp LICENSE debian/usr/share/doc/davinci-video-converter/
|
||||
|
||||
- name: Create postinst script
|
||||
run: |
|
||||
cat > debian/DEBIAN/postinst << 'EOF'
|
||||
#!/bin/bash
|
||||
set -e
|
||||
chmod 755 /usr/bin/davinci-video-converter
|
||||
EOF
|
||||
chmod 755 debian/DEBIAN/postinst
|
||||
|
||||
- name: Create prerm script
|
||||
run: |
|
||||
cat > debian/DEBIAN/prerm << 'EOF'
|
||||
#!/bin/bash
|
||||
set -e
|
||||
if [ "$1" = "remove" ]; then
|
||||
echo "Removing davinci-video-converter..."
|
||||
fi
|
||||
EOF
|
||||
chmod 755 debian/DEBIAN/prerm
|
||||
|
||||
- name: Build DEB package
|
||||
run: |
|
||||
dpkg-deb --build debian davinci-video-converter_${GITHUB_REF#refs/tags/}_${{ matrix.arch }}.deb
|
||||
|
||||
- name: Upload DEB package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: davinci-video-converter-${{ matrix.arch }}.deb
|
||||
path: davinci-video-converter_*.deb
|
||||
|
||||
- name: Upload to Release
|
||||
if: github.event_name == 'release'
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: davinci-video-converter_*.deb
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user