-
Notifications
You must be signed in to change notification settings - Fork 1
115 lines (106 loc) · 3.71 KB
/
release.yml
File metadata and controls
115 lines (106 loc) · 3.71 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Build and Release Standalone GUI
on:
push:
tags:
- 'v*'
jobs:
generate-release-notes:
runs-on: ubuntu-latest
outputs:
changelog: ${{ steps.notes.outputs.changelog }}
steps:
- uses: actions/checkout@v4
- id: notes
run: |
echo "changelog=$(git log -20 --pretty=format:'* %s')" >> $GITHUB_OUTPUT && echo $GITHUB_OUTPUT
build-windows:
needs: generate-release-notes
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install pyinstaller pyqt6 opencv-python huggingface_hub[cli]==0.25.2
- name: Build exe
run: pyinstaller --onefile --windowed osl_visualizer/main.py --add-data "osl_visualizer/ui;ui"
- name: Rename binary
run: move dist\\main.exe dist\\OSL-GUI-win.exe
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: OSL-GUI-Windows
path: dist/OSL-GUI-win.exe
- name: Zip Windows binary
run: powershell Compress-Archive -Path dist\OSL-GUI-win.exe -DestinationPath dist\OSL-GUI-win.zip
- name: Upload Release Asset
uses: softprops/action-gh-release@v2
with:
files: dist/OSL-GUI-win.zip
tag_name: ${{ github.ref_name }}
body: ${{ needs.generate-release-notes.outputs.changelog }}
build-macos:
needs: generate-release-notes
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install pyinstaller pyqt6 opencv-python huggingface_hub[cli]==0.25.2
- name: Build app
run: pyinstaller --onefile --windowed osl_visualizer/main.py --add-data "osl_visualizer/ui:ui"
- name: Rename binary
run: mv dist/main dist/OSL-GUI-mac
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: OSL-GUI-macOS
path: dist/OSL-GUI-mac
- name: Zip binary
run: cd dist && zip OSL-GUI-mac.zip OSL-GUI-mac && cd ..
- name: Upload Release Asset
uses: softprops/action-gh-release@v2
with:
files: dist/OSL-GUI-mac.zip
tag_name: ${{ github.ref_name }}
body: ${{ needs.generate-release-notes.outputs.changelog }}
build-linux:
needs: generate-release-notes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install requirements
run: |
sudo apt-get update
sudo apt-get install -y libgl1 libglib2.0-0
python -m pip install --upgrade pip
pip install pyinstaller pyqt6 opencv-python huggingface_hub[cli]==0.25.2
- name: Build binary
run: pyinstaller --onefile --windowed osl_visualizer/main.py --add-data "osl_visualizer/ui:ui"
- name: Rename binary
run: mv dist/main dist/OSL-GUI-linux
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: OSL-GUI-Linux
path: dist/OSL-GUI-linux
- name: Zip Linux binary
run: cd dist && zip OSL-GUI-linux.zip OSL-GUI-linux && cd ..
- name: Upload Release Asset
uses: softprops/action-gh-release@v2
with:
files: dist/OSL-GUI-linux.zip
tag_name: ${{ github.ref_name }}
body: ${{ needs.generate-release-notes.outputs.changelog }}
permissions:
contents: write