mirror of
https://github.com/woodchen-ink/video2gif.git
synced 2025-07-18 13:42:03 +08:00
chore(workflow): update FFmpeg download method and DMG creation process
This commit is contained in:
parent
ffc0a762b1
commit
b0d557166f
42
.github/workflows/release.yml
vendored
42
.github/workflows/release.yml
vendored
@ -91,12 +91,19 @@ jobs:
|
|||||||
- name: Download FFmpeg
|
- name: Download FFmpeg
|
||||||
run: |
|
run: |
|
||||||
mkdir ffmpeg
|
mkdir ffmpeg
|
||||||
curl -L https://evermeet.cx/ffmpeg/getrelease/zip -o ffmpeg.zip
|
curl -L https://github.com/eugeneware/ffmpeg-static/releases/download/b4.4/darwin-x64 -o ffmpeg/ffmpeg
|
||||||
unzip ffmpeg.zip -d ffmpeg
|
curl -L https://github.com/eugeneware/ffmpeg-static/releases/download/b4.4/darwin-x64 -o ffmpeg/ffprobe
|
||||||
curl -L https://evermeet.cx/ffmpeg/getrelease/zip/ffprobe -o ffprobe.zip
|
|
||||||
unzip ffprobe.zip -d ffmpeg
|
|
||||||
chmod +x ffmpeg/ffmpeg ffmpeg/ffprobe
|
chmod +x ffmpeg/ffmpeg ffmpeg/ffprobe
|
||||||
|
|
||||||
|
# 或者使用 Homebrew(备选方案)
|
||||||
|
- name: Install FFmpeg using Homebrew
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
brew install ffmpeg
|
||||||
|
mkdir -p ffmpeg
|
||||||
|
cp $(which ffmpeg) ffmpeg/
|
||||||
|
cp $(which ffprobe) ffmpeg/
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
@ -119,6 +126,33 @@ jobs:
|
|||||||
mkdir -p video2gif.app/Contents/MacOS
|
mkdir -p video2gif.app/Contents/MacOS
|
||||||
mkdir -p video2gif.app/Contents/Resources/ffmpeg
|
mkdir -p video2gif.app/Contents/Resources/ffmpeg
|
||||||
mv video2gif video2gif.app/Contents/MacOS/
|
mv video2gif video2gif.app/Contents/MacOS/
|
||||||
|
cp ../ffmpeg/* video2gif.app/Contents/Resources/ffmpeg/
|
||||||
|
|
||||||
|
# 创建 Info.plist
|
||||||
|
cat > video2gif.app/Contents/Info.plist << EOL
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>video2gif</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.example.video2gif</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>Video2Gif</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0.0</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.10</string>
|
||||||
|
<key>NSHighResolutionCapable</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
EOL
|
||||||
|
|
||||||
|
# 创建 DMG
|
||||||
hdiutil create -volname "Video2Gif" -srcfolder video2gif.app -ov -format UDZO video2gif.dmg
|
hdiutil create -volname "Video2Gif" -srcfolder video2gif.app -ov -format UDZO video2gif.dmg
|
||||||
|
|
||||||
- name: Upload Release Asset
|
- name: Upload Release Asset
|
||||||
|
Loading…
x
Reference in New Issue
Block a user