From 46fcafd2283fff173574ee4bc286e2b0e495d08e Mon Sep 17 00:00:00 2001 From: m4xx1m Date: Thu, 12 Nov 2026 22:01:01 +0300 Subject: [PATCH] ci: trigger build only on tag push and workflow_dispatch, add cache for static ffmpeg --- .gitea/workflows/build.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 7e9b90f..4da360f 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -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