-
Notifications
You must be signed in to change notification settings - Fork 62
64 lines (53 loc) · 1.7 KB
/
release.yaml
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
64
name: Release
on:
workflow_dispatch:
inputs:
version:
description: "version"
required: false
permissions:
contents: write
env:
QT_QPA_PLATFORM: offscreen
jobs:
build-windows:
name: build-windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -U "https://yt-dlp.github.io/Pyinstaller-Builds/x86_64/pyinstaller-6.7.0-py3-none-any.whl"
- name: Set version
working-directory: ./app
shell: bash
run: |
if [ -n "${{ github.event.inputs.version }}" ]; then
version=${{ github.event.inputs.version }}
else
version=$(git rev-parse --short HEAD)
fi
sed -i "s/^__version__.*/__version__ = \"$version\"/" ./app.py
- name: Build application
working-directory: ./app
run: |
pyinstaller --name=yt-dlp-gui --clean -y app.py --icon ./ui/assets/yt-dlp-gui.ico --add-data "config.toml;." --noconsole
Compress-Archive -Path dist/* -DestinationPath ./yt-dlp-gui-win64.zip
- uses: actions/upload-artifact@v4
if: ${{ github.event.inputs.version == '' }}
with:
name: yt-dlp-gui-win64
path: ./app/dist/
- uses: softprops/action-gh-release@v2
if: ${{ github.event.inputs.version != '' }}
with:
tag_name: ${{ github.event.inputs.version }}
generate_release_notes: true
draft: false
prerelease: false
files: |
./app/yt-dlp-gui-win64.zip