1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-22 02:12:30 +01:00

use custom ffmpeg for mac

This commit is contained in:
Mikael Finstad 2020-04-01 02:17:38 +08:00
parent 0f0e5b9cf2
commit 6a924c74e7
2 changed files with 11 additions and 7 deletions

View File

@ -6,9 +6,8 @@ jobs:
release:
runs-on: ${{ matrix.os }}
# TODO
# env:
# is_tag: ${{ startsWith(github.ref, 'refs/tags/v') }}
env:
is_tag: ${{ startsWith(github.ref, 'refs/tags/v') }}
strategy:
matrix:
@ -38,6 +37,10 @@ jobs:
mkdir -p ~/private_keys/
echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8
- name: Download custom ffmpeg for Mac
if: startsWith(matrix.os, 'macos')
run: npm run download-ffmpeg
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
@ -47,7 +50,7 @@ jobs:
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
release: ${{ env.is_tag == 'true' }}
mac_certs: ${{ secrets.mac_certs }}
mac_certs_password: ${{ secrets.mac_certs_password }}
@ -61,7 +64,7 @@ jobs:
API_KEY_ISSUER_ID: ${{ secrets.api_key_issuer_id }}
- name: Upload to Mac App Store
if: startsWith(matrix.os, 'macos') && startsWith(github.ref, 'refs/tags/v')
if: startsWith(matrix.os, 'macos') && env.is_tag == 'true'
run: |
mkdir -p ~/.appstoreconnect/private_keys/
echo '${{ secrets.api_key }}' > ~/.appstoreconnect/private_keys/AuthKey_${{ secrets.api_key_id }}.p8

View File

@ -9,6 +9,7 @@
"scripts": {
"start": "concurrently -k \"BROWSER=none PORT=3001 react-scripts start\" \"wait-on http://localhost:3001 && electron .\"",
"icon-gen": "mkdirp icon-build && svg2png src/icon.svg -o ./icon-build/app-512.png -w 512 -h 512 && mkdirp icns-build && icon-gen -i src/icon.svg -o ./icns-build --icns --icns-sizes 512,1024 && mkdirp build-resources/appx && npx svg2png src/icon.svg --output=build-resources/appx/StoreLogo.png --width=50 --height=50 && npx svg2png src/icon.svg --output=build-resources/appx/Square150x150Logo.png --width=300 --height=300 && npx svg2png src/icon.svg --output=build-resources/appx/Square44x44Logo.png --width=44 --height=44 && npx svg2png src/icon.svg --output=build-resources/appx/Wide310x150Logo.png --width=620 --height=300",
"download-ffmpeg": "mkdirp ffmpeg-mac && wget https://github.com/mifi/ffmpeg-build-script/releases/download/v2.1.0/ffmpeg -O ffmpeg-mac/ffmpeg && wget https://github.com/mifi/ffmpeg-build-script/releases/download/v2.1.0/ffprobe -O ffmpeg-mac/ffprobe && chmod +x ffmpeg-mac/ffmpeg && chmod +x ffmpeg-mac/ffprobe",
"build": "yarn icon-gen && react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
@ -129,8 +130,8 @@
"dmg"
],
"extraResources": [
"node_modules/ffmpeg-static/ffmpeg",
"node_modules/ffprobe-static/bin/darwin/**"
{ "from": "ffmpeg-mac/ffmpeg", "to": "node_modules/ffmpeg-static/ffmpeg" },
{ "from": "ffmpeg-mac/ffprobe", "to": "node_modules/ffmpeg-static/ffprobe" }
],
"icon": "icns-build/app.icns"
},