-
Notifications
You must be signed in to change notification settings - Fork 708
84 lines (76 loc) · 3.44 KB
/
main.yml
File metadata and controls
84 lines (76 loc) · 3.44 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
name: Build and Release
on:
push:
branches: [release]
permissions:
contents: write
jobs:
build_and_release:
runs-on: ${{ matrix.os }}
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
os:
[
macos-latest,
macos-15-intel,
ubuntu-latest,
windows-latest,
]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v4
with:
node-version: 24
- name: Linux Build
if: matrix.os == 'ubuntu-latest'
run: |
sudo snap install snapcraft --classic
wget "https://github.com/aandrew-me/ffmpeg-builds/releases/download/v8/ffmpeg_linux_amd64.tar.xz"
wget "https://github.com/aandrew-me/ffmpeg-builds/releases/download/v8/node_linux_amd64" -O node
chmod +x node
tar -xf ffmpeg_linux_amd64.tar.xz
mv ffmpeg_linux_amd64 ffmpeg
chmod +x ffmpeg/bin/ffmpeg
chmod +x ffmpeg/bin/ffprobe
patchelf --set-rpath '$ORIGIN/../lib' ffmpeg/bin/ffmpeg
patchelf --set-rpath '$ORIGIN/../lib' ffmpeg/bin/ffprobe
rm ffmpeg_linux_amd64.tar.xz
npm i
npx electron-builder -l --publish=always
npm run gh-linux
- name: Macos Intel Build
if: matrix.os == 'macos-15-intel'
run: |
mkdir -p ffmpeg/bin
curl -L https://github.com/aandrew-me/ffmpeg-builds/releases/download/v8/ffmpeg_macos_amd64 -o ffmpeg/bin/ffmpeg
curl -L https://github.com/aandrew-me/ffmpeg-builds/releases/download/v8/ffprobe_macos_amd64 -o ffmpeg/bin/ffprobe
chmod +x ffmpeg/bin/ffmpeg
chmod +x ffmpeg/bin/ffprobe
npm i
npm run gh-mac
- name: Macos Arm Build
if: matrix.os == 'macos-latest'
run: |
mkdir -p ffmpeg/bin
curl -L https://github.com/aandrew-me/ffmpeg-builds/releases/download/v8/ffmpeg_macos_amd64 -o ffmpeg/bin/ffmpeg
curl -L https://github.com/aandrew-me/ffmpeg-builds/releases/download/v8/ffprobe_macos_arm64 -o ffmpeg/bin/ffprobe
chmod +x ffmpeg/bin/ffmpeg
chmod +x ffmpeg/bin/ffprobe
npm i
npm run gh-mac
- name: Windows Build
if: matrix.os == 'windows-latest'
shell: powershell
run: |
Invoke-WebRequest -Uri "https://github.com/aandrew-me/ffmpeg-builds/releases/download/v8/node.exe" -OutFile node.exe
Invoke-WebRequest -Uri "https://github.com/aandrew-me/ffmpeg-builds/releases/download/v8/ffmpeg_win64.zip" -OutFile ffmpeg_win64.zip
Expand-Archive -Path ffmpeg_win64.zip -DestinationPath .
Move-Item -Path .\ffmpeg_win64 -Destination .\ffmpeg
Remove-Item -Path ffmpeg_win64.zip
npm i
npm run gh-windows