Skip to content

Commit d28973e

Browse files
push workflows
1 parent 7c748ea commit d28973e

2 files changed

Lines changed: 91 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: Build Standalone GUI
22

33
on:
44
push:
5-
tags:
6-
- 'v*'
75
branches:
86
- main
97
workflow_dispatch:

.github/workflows/release.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Build and Release Standalone GUI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
generate-release-notes:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
changelog: ${{ steps.notes.outputs.changelog }}
13+
steps:
14+
- uses: actions/checkout@v4
15+
- id: notes
16+
run: |
17+
echo 'changelog<<EOF' >> $GITHUB_OUTPUT
18+
git log -20 --pretty=format:"* %s" > temp_changelog.txt
19+
cat temp_changelog.txt >> $GITHUB_OUTPUT
20+
echo 'EOF' >> $GITHUB_OUTPUT
21+
22+
build-windows:
23+
needs: generate-release-notes
24+
runs-on: windows-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.9'
30+
- name: Install requirements
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install pyinstaller pyqt6 opencv-python
34+
- name: Build exe
35+
run: pyinstaller --onefile --windowed osl_visualizer/main.py
36+
- name: Rename binary
37+
run: move dist\\main.exe dist\\OSL-GUI-win.exe
38+
- name: Upload Release Asset
39+
uses: softprops/action-gh-release@v2
40+
with:
41+
files: dist/OSL-GUI-win.exe
42+
tag_name: ${{ github.ref_name }}
43+
body: ${{ needs.generate-release-notes.outputs.changelog }}
44+
45+
build-macos:
46+
needs: generate-release-notes
47+
runs-on: macos-latest
48+
steps:
49+
- uses: actions/checkout@v4
50+
- uses: actions/setup-python@v5
51+
with:
52+
python-version: '3.9'
53+
- name: Install requirements
54+
run: |
55+
python -m pip install --upgrade pip
56+
pip install pyinstaller pyqt6 opencv-python
57+
- name: Build app
58+
run: pyinstaller --onefile --windowed osl_visualizer/main.py
59+
- name: Rename binary
60+
run: mv dist/main dist/OSL-GUI-mac
61+
- name: Upload Release Asset
62+
uses: softprops/action-gh-release@v2
63+
with:
64+
files: dist/OSL-GUI-mac
65+
tag_name: ${{ github.ref_name }}
66+
body: ${{ needs.generate-release-notes.outputs.changelog }}
67+
68+
build-linux:
69+
needs: generate-release-notes
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@v4
73+
- uses: actions/setup-python@v5
74+
with:
75+
python-version: '3.9'
76+
- name: Install requirements
77+
run: |
78+
sudo apt-get update
79+
sudo apt-get install -y libgl1 libglib2.0-0
80+
python -m pip install --upgrade pip
81+
pip install pyinstaller pyqt6 opencv-python
82+
- name: Build binary
83+
run: pyinstaller --onefile --windowed osl_visualizer/main.py
84+
- name: Rename binary
85+
run: mv dist/main dist/OSL-GUI-linux
86+
- name: Upload Release Asset
87+
uses: softprops/action-gh-release@v2
88+
with:
89+
files: dist/OSL-GUI-linux
90+
tag_name: ${{ github.ref_name }}
91+
body: ${{ needs.generate-release-notes.outputs.changelog }}

0 commit comments

Comments
 (0)