You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
2.8 KiB
YAML
80 lines
2.8 KiB
YAML
name: Build and Release
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build_and_release:
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
strategy:
|
|
matrix:
|
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Node.js, NPM and Yarn
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 18
|
|
- name: Linux Build
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
run: |
|
|
sudo snap install snapcraft --classic
|
|
wget "https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-n6.0-latest-linux64-gpl-6.0.tar.xz"
|
|
tar xvf ffmpeg-n6.0-latest-linux64-gpl-6.0.tar.xz
|
|
cp ffmpeg-n6.0-latest-linux64-gpl-6.0/bin/ffmpeg ffmpeg
|
|
chmod +x ffmpeg
|
|
rm -rf ffmpeg-n6.0-latest-linux64-gpl-6.0
|
|
rm ffmpeg-n6.0-latest-linux64-gpl-6.0.tar.xz
|
|
npm i
|
|
npx electron-builder -l --publish=always
|
|
npm run gh-linux
|
|
|
|
- name: Macos Build
|
|
if: matrix.os == 'macos-latest'
|
|
run: |
|
|
curl https://evermeet.cx/ffmpeg/ffmpeg-6.0.zip -o ffmpeg.zip
|
|
unzip ffmpeg.zip
|
|
chmod +x ffmpeg
|
|
rm ffmpeg.zip
|
|
npm i
|
|
npm run gh-mac
|
|
|
|
- name: Windows Build
|
|
if: matrix.os == 'windows-latest'
|
|
run: |
|
|
Invoke-WebRequest -Uri "https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-n6.0-latest-win64-gpl-6.0.zip" -OutFile ffmpeg.zip
|
|
Expand-Archive ffmpeg.zip
|
|
ls ffmpeg
|
|
ls ffmpeg\bin
|
|
Copy-Item .\ffmpeg\bin\ffmpeg.exe ffmpeg.exe
|
|
Remove-Item -Recurse -Force ffmpeg
|
|
Remove-Item -Force ffmpeg.zip
|
|
npm i
|
|
npm run gh-windows
|
|
# - name: Upload Artifacts
|
|
# id: upload-artifacts
|
|
# uses: softprops/action-gh-release@v1
|
|
# with:
|
|
# files: |
|
|
# tgpt-linux-amd64
|
|
# tgpt-linux-i386
|
|
# tgpt-linux-arm64
|
|
# tgpt-amd64.exe
|
|
# tgpt-i386.exe
|
|
# tgpt-mac-amd64
|
|
# tgpt-mac-arm64
|
|
# token: ${{ secrets.GITHUB_TOKEN }}
|
|
# draft: true
|
|
# tag_name: v
|
|
# name: tgpt
|