ci: trigger build only on tag push and workflow_dispatch, add cache for static ffmpeg
This commit is contained in:
1 file changed
+9
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user