-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (111 loc) · 4.26 KB
/
release.yml
File metadata and controls
133 lines (111 loc) · 4.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# SPDX-FileCopyrightText: © 2025 StreamKit Contributors
#
# SPDX-License-Identifier: MPL-2.0
name: Release
on:
push:
tags:
- 'v*.*.*'
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
build-linux-x64:
name: Build Linux x64
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.5"
- name: Build UI
working-directory: ./ui
run: |
bun install --frozen-lockfile
bun run build
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.92.0"
- uses: Swatinem/rust-cache@v2
- name: Install system dependencies (libvpx for VP9 video support)
run: sudo apt-get update && sudo apt-get install -y libvpx-dev
- name: Build release binaries
run: |
cargo build --locked -p streamkit-server --bin skit --release --features "moq"
cargo build --locked -p streamkit-client --bin skit-cli --release
- name: Strip binaries
run: |
strip target/release/skit
strip target/release/skit-cli
- name: Prepare release directory
run: |
mkdir -p streamkit-${{ github.ref_name }}/plugins/{wasm,native}
mkdir -p streamkit-${{ github.ref_name }}/samples
cp target/release/skit streamkit-${{ github.ref_name }}/
cp target/release/skit-cli streamkit-${{ github.ref_name }}/
cp LICENSE streamkit-${{ github.ref_name }}/
cp README.md streamkit-${{ github.ref_name }}/
cp DOCKER.md streamkit-${{ github.ref_name }}/
cp NOTICE streamkit-${{ github.ref_name }}/
cp -r LICENSES streamkit-${{ github.ref_name }}/
cp docker-skit.toml streamkit-${{ github.ref_name }}/
cp docker-skit-gpu.toml streamkit-${{ github.ref_name }}/
cp samples/skit.toml streamkit-${{ github.ref_name }}/samples/skit.toml
cp -r samples/pipelines streamkit-${{ github.ref_name }}/samples/
- name: Create tarball
run: |
tar -czf streamkit-${{ github.ref_name }}-linux-x64.tar.gz streamkit-${{ github.ref_name }}/
- name: Generate checksum
run: |
sha256sum streamkit-${{ github.ref_name }}-linux-x64.tar.gz > streamkit-${{ github.ref_name }}-linux-x64.tar.gz.sha256
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux-x64
path: |
streamkit-${{ github.ref_name }}-linux-x64.tar.gz
streamkit-${{ github.ref_name }}-linux-x64.tar.gz.sha256
create-release:
name: Create GitHub Release
needs: [build-linux-x64]
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # Full history for changelog
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Generate changelog
id: changelog
run: |
# Extract version tag
VERSION="${{ github.ref_name }}"
# Simple changelog from git log (can be enhanced with git-cliff later)
echo "## What's Changed" > changelog.md
PREV_TAG=$(git describe --tags --abbrev=0 --match 'v[0-9]*' HEAD^ 2>/dev/null || echo "")
if [ -n "$PREV_TAG" ]; then
git log --pretty=format:"- %s (%h)" ${PREV_TAG}..HEAD >> changelog.md
else
echo "- Initial release" >> changelog.md
fi
echo "" >> changelog.md
echo "" >> changelog.md
echo "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${PREV_TAG}...${{ github.ref_name }}" >> changelog.md
cat changelog.md
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/**/streamkit-*.tar.gz
artifacts/**/streamkit-*.tar.gz.sha256
body_path: changelog.md
draft: false
prerelease: ${{ contains(github.ref_name, '-rc') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-alpha') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}