ci: trigger build only on tag push and workflow_dispatch, add cache for static ffmpeg

This commit is contained in:
m4xx1m committed 2026-11-12 22:01:01 +03:00
1 parent e9364cbfe4
commit 46fcafd228
1 file changed
+9 -2
+9 -2
View File
@@ -2,8 +2,6 @@ name: Build Windows Installer
on:
push:
branches:
- main
tags:
- 'v*'
workflow_dispatch:
@@ -74,8 +72,17 @@ jobs:
-ldflags="-H windowsgui -s -w -X main.Version=${{ steps.ver.outputs.version }}" \
-o dist/convert.exe .
- name: Cache static FFmpeg binaries
id: cache-ffmpeg
uses: actions/cache@v3
with:
path: dist/bin
key: ffmpeg-win64-master-static
- name: Download static FFmpeg & FFprobe for Windows
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
run: |
mkdir -p dist/bin
wget -q -O ffmpeg.zip "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip"
unzip -j -q ffmpeg.zip "*/bin/ffmpeg.exe" "*/bin/ffprobe.exe" -d dist/bin/
rm -f ffmpeg.zip