-
-
Notifications
You must be signed in to change notification settings - Fork 44
63 lines (52 loc) · 2.3 KB
/
windows-qt-zip.yml
File metadata and controls
63 lines (52 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Create Windows Qt ZIP (Onedir Build)
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
create-qt-zip:
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pyinstaller
- name: Download FFmpeg
run: |
$ffmpegUrl = "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip"
$outputPath = "ffmpeg.zip"
Invoke-WebRequest -Uri $ffmpegUrl -OutFile $outputPath
Expand-Archive -Path $outputPath -DestinationPath "ffmpeg"
Move-Item -Path "ffmpeg/ffmpeg-master-latest-win64-gpl/bin/ffmpeg.exe" -Destination "ffmpeg.exe"
- name: Update Manifest Version
run: |
$tag = "${{ github.ref_name }}"
$version = $tag -replace 'v', ''
$manifestPath = "build_meta/YoutubeGo.manifest"
$manifestContent = Get-Content $manifestPath -Raw
$manifestContent = $manifestContent -replace 'version="[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"', "version=`"$version.0`""
$manifestContent = $manifestContent -replace 'Version [0-9]+\.[0-9]+\.[0-9]+', "Version $version"
Set-Content -Path $manifestPath -Value $manifestContent
- name: Build EXE with PyInstaller (Onedir + Embedded Data)
run: pyinstaller --noconfirm --onedir --windowed --name YoutubeGo --icon=assets/app.ico --add-data "assets;assets" --add-data "ui/themes;ui/themes" --add-data "assets/app.png;assets" --add-data "ffmpeg.exe;." --add-data "assets/app.ico;assets" main.py
- name: Create YoutubeGo-Win directory and prepare final ZIP
run: |
mkdir YoutubeGo-Win
xcopy dist\YoutubeGo\* YoutubeGo-Win\ /E /I /Y
copy QtLicense.md YoutubeGo-Win\
copy LICENSE YoutubeGo-Win\
Compress-Archive -Path YoutubeGo-Win\* -DestinationPath "YoutubeGo-Win.zip" -Force
- name: Upload ZIP to GitHub Releases
uses: softprops/action-gh-release@v1
with:
files: YoutubeGo-Win.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}