Repository navigation
63 lines (58 loc) · 2.31 KB
/
Copy pathrelease.yml
File metadata and controls
63 lines (58 loc) · 2.31 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
# On a tag v<jellyfin version>-<n> (v8.1.3-1-1: jellyfin-ffmpeg v8.1.3-1, these patches' first release on
# it): build both architectures, run the suite on each, and publish the two tarballs with their SHA-256
# sums. The tarballs hold ffmpeg and ffprobe at their root, as jellyfin's portable ones do.
name: release
on:
push:
tags: ["v*"]
permissions:
contents: read
jobs:
check-tag:
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: The tag names the pinned jellyfin-ffmpeg
run: |
# Exactly <jellyfin tag>-<n>, n from 1 without leading zeros: not v8.1.3-10-1, nor v8.1.3-1-1x.
n=${GITHUB_REF_NAME#"$(cat JELLYFIN_TAG)"-}
case "$n" in
"$GITHUB_REF_NAME" | "" | 0* | *[!0-9]*)
echo "tag $GITHUB_REF_NAME is not $(cat JELLYFIN_TAG)-<n>"; exit 1 ;;
esac
- run: make check-patch
- run: make check-spec
build:
needs: check-tag
strategy:
matrix:
arch: [amd64, arm64]
uses: ./.github/workflows/build.yml
with:
arch: ${{ matrix.arch }}
publish:
needs: build
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
contents: write
steps:
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: ffmpeg-*
path: built
- name: Name the tarballs and sum them
run: |
version=${GITHUB_REF_NAME#v}
mkdir release
cp built/ffmpeg-amd64/*_portable_linux64-gpl.tar.xz "release/ffmpeg-fdproxy_${version}_linux64-gpl.tar.xz"
cp built/ffmpeg-arm64/*_portable_linuxarm64-gpl.tar.xz "release/ffmpeg-fdproxy_${version}_linuxarm64-gpl.tar.xz"
(cd release && sha256sum -- *.tar.xz > SHA256SUMS && cat SHA256SUMS)
- name: Publish
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "$GITHUB_REF_NAME" release/* --repo "$GITHUB_REPOSITORY" \
--title "$GITHUB_REF_NAME" \
--notes "jellyfin-ffmpeg ${GITHUB_REF_NAME%-*} with the fdproxy protocol, for linux/amd64 and linux/arm64. Built and tested by this release's workflow run; SHA256SUMS lists each tarball's SHA-256. GPL, as the FFmpeg build it patches."