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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -74,8 +72,17 @@ jobs:
|
|||||||
-ldflags="-H windowsgui -s -w -X main.Version=${{ steps.ver.outputs.version }}" \
|
-ldflags="-H windowsgui -s -w -X main.Version=${{ steps.ver.outputs.version }}" \
|
||||||
-o dist/convert.exe .
|
-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
|
- name: Download static FFmpeg & FFprobe for Windows
|
||||||
|
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
|
||||||
run: |
|
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"
|
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/
|
unzip -j -q ffmpeg.zip "*/bin/ffmpeg.exe" "*/bin/ffprobe.exe" -d dist/bin/
|
||||||
rm -f ffmpeg.zip
|
rm -f ffmpeg.zip
|
||||||
|
|||||||
Reference in new issue
Block a user