-
-
Notifications
You must be signed in to change notification settings - Fork 141
124 lines (117 loc) · 4.47 KB
/
publish.yaml
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
name: '🚀 Build and Publish jellyfin-ffmpeg'
on:
release:
types:
- released
jobs:
build_publish_debian:
uses: ./.github/workflows/_meta.yaml
with:
distro: 'debian'
codenames: '["buster", "bullseye", "bookworm"]'
architectures: '["amd64", "arm64", "armhf"]'
release: true
secrets:
deploy-host: ${{ secrets.DEPLOY_HOST }}
deploy-user: ${{ secrets.DEPLOY_USER }}
deploy-key: ${{ secrets.DEPLOY_KEY }}
build_publish_ubuntu:
uses: ./.github/workflows/_meta.yaml
with:
distro: 'ubuntu'
codenames: '["focal", "jammy", "lunar", "mantic"]'
architectures: '["amd64", "arm64", "armhf"]'
release: true
secrets:
deploy-host: ${{ secrets.DEPLOY_HOST }}
deploy-user: ${{ secrets.DEPLOY_USER }}
deploy-key: ${{ secrets.DEPLOY_KEY }}
build_publish_windows_portable:
uses: ./.github/workflows/_meta_portable.yaml
with:
os: 'windows'
architectures: '["win64"]'
release: true
secrets:
deploy-host: ${{ secrets.DEPLOY_HOST }}
deploy-user: ${{ secrets.DEPLOY_USER }}
deploy-key: ${{ secrets.DEPLOY_KEY }}
build_publish_linux_portable:
uses: ./.github/workflows/_meta_portable.yaml
with:
os: 'linux'
architectures: '["amd64", "arm64"]'
release: true
secrets:
deploy-host: ${{ secrets.DEPLOY_HOST }}
deploy-user: ${{ secrets.DEPLOY_USER }}
deploy-key: ${{ secrets.DEPLOY_KEY }}
maintain_repository:
name: Maintain Repository
runs-on: ubuntu-latest
needs:
- build_publish_debian
- build_publish_ubuntu
strategy:
fail-fast: true
max-parallel: 1
matrix:
arrays: [
{distro: 'debian', codename: 'buster'},
{distro: 'debian', codename: 'bullseye'},
{distro: 'debian', codename: 'bookworm'},
{distro: 'ubuntu', codename: 'focal'},
{distro: 'ubuntu', codename: 'jammy'},
{distro: 'ubuntu', codename: 'lunar'},
{distro: 'ubuntu', codename: 'mantic'}
]
steps:
- name: Sync mirrors and update symlinks
uses: appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
script_stop: true
script: |-
set -o errexit
set -o xtrace
tag="${{ github.event.release.tag_name }}"
version="${tag#v}"
basename="jellyfin-ffmpeg*_${version}-${{ matrix.arrays.codename }}"
find /srv/repository/releases/server/${{ matrix.arrays.distro }}/ -type l -name "jellyfin-ffmpeg*_*" -exec rm {} \;
find /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version} -type f -name "${basename}_*.deb" | while read file; do
reprepro -b /srv/repository/${{ matrix.arrays.distro }} --export=never --keepunreferencedfiles includedeb ${{ matrix.arrays.codename }} ${file}
done
reprepro -b /srv/repository/${{ matrix.arrays.distro }} deleteunreferenced
reprepro -b /srv/repository/${{ matrix.arrays.distro }} export
maintain_repository_portable:
name: Maintain Repository (Portable)
runs-on: ubuntu-latest
needs:
- build_publish_windows_portable
strategy:
fail-fast: true
max-parallel: 1
matrix:
arrays: [
{distro: 'windows', codename: 'windows'},
]
steps:
- name: Update symlinks
uses: appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
script_stop: true
script: |-
set -o errexit
set -o xtrace
tag="${{ github.event.release.tag_name }}"
version="${tag#v}"
if [ "${{ matrix.arrays.distro }}" == "windows" ]; then
mkdir -p /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version}
ln -fs /srv/repository/releases/ffmpeg/${version}/*.zip /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version}/
ln -fs /srv/repository/releases/ffmpeg/${version}/*.zip.sha265sum /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version}/
fi