Skip to content

Commit 2e93b0e

Browse files
committed
ci(release): add workflow for building and releasing FFmpeg static libraries
- Creates new GitHub Actions workflow to build FFmpeg static libraries - Adds support for multiple platforms (Linux/macOS) and architectures (amd64/arm64) - Implements automatic release creation with tarballs and checksums - Updates justfile with helper commands to trigger and monitor releases - Adds comprehensive implementation plan with 5-phase strategy for library distribution - Includes robust error handling, cross-compilation support, and checksums validation
1 parent 3c9bb1d commit 2e93b0e

5 files changed

Lines changed: 835 additions & 200 deletions

File tree

.github/workflows/release-libs.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Release Static Libraries
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Library version (e.g., 8.0.0.0)'
8+
required: true
9+
push:
10+
tags:
11+
- 'lib-*'
12+
13+
jobs:
14+
build-and-release:
15+
name: Build and release for ${{ matrix.os }} ${{ matrix.arch }}
16+
runs-on: ${{ matrix.runner }}
17+
strategy:
18+
matrix:
19+
include:
20+
- os: linux
21+
arch: amd64
22+
runner: ubuntu-24.04
23+
- os: linux
24+
arch: arm64
25+
runner: ubuntu-24.04-arm
26+
- os: darwin
27+
arch: amd64
28+
runner: macos-15-intel
29+
- os: darwin
30+
arch: arm64
31+
runner: macos-latest
32+
fail-fast: false
33+
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v6
37+
38+
- name: Show system info
39+
run: uname -a
40+
41+
- name: Set up Go
42+
uses: actions/setup-go@v6
43+
with:
44+
go-version: '1.24'
45+
46+
- name: Install Rust toolchain
47+
uses: dtolnay/rust-toolchain@stable
48+
with:
49+
toolchain: stable
50+
51+
- name: Install cargo-c
52+
run: cargo install cargo-c
53+
54+
- name: Install Linux dependencies
55+
if: matrix.os == 'linux'
56+
run: sudo apt-get update && sudo apt-get install -y yasm nasm meson gperf python3
57+
58+
- name: Install macOS dependencies
59+
if: matrix.os == 'darwin'
60+
run: brew update && brew install yasm autoconf ragel meson nasm automake libtool python3
61+
62+
- name: Build FFmpeg library
63+
run: go run ./internal/builder/
64+
65+
- name: List built files
66+
run: ls -la lib/${{ matrix.os }}_${{ matrix.arch }}/
67+
68+
- name: Create tarball
69+
run: |
70+
cd lib
71+
tar -czf ../ffmpeg-${{ matrix.os }}-${{ matrix.arch }}.tar.gz ${{ matrix.os }}_${{ matrix.arch }}/libffmpeg.a
72+
73+
- name: Generate checksum
74+
run: |
75+
sha256sum ffmpeg-${{ matrix.os }}-${{ matrix.arch }}.tar.gz > ffmpeg-${{ matrix.os }}-${{ matrix.arch }}.tar.gz.sha256
76+
77+
- name: Create Release
78+
uses: softprops/action-gh-release@v2
79+
with:
80+
files: |
81+
ffmpeg-${{ matrix.os }}-${{ matrix.arch }}.tar.gz
82+
ffmpeg-${{ matrix.os }}-${{ matrix.arch }}.tar.gz.sha256
83+
tag_name: ${{ github.ref_name }}
84+
body: |
85+
FFmpeg static libraries for ffmpeg-statigo
86+
87+
Version: ${{ inputs.version || github.ref_name }}
88+
89+
Platform: ${{ matrix.os }}-${{ matrix.arch }}

0 commit comments

Comments
 (0)