Skip to content

Commit bdfe675

Browse files
authored
Update build-release.yml
1 parent d995ec6 commit bdfe675

File tree

1 file changed

+116
-0
lines changed

1 file changed

+116
-0
lines changed

.github/workflows/build-release.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,119 @@
1+
name: Build Multi-Platform Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Version to build'
11+
required: true
12+
default: '2.0.3'
13+
14+
jobs:
15+
build:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
include:
21+
- os: windows-2022
22+
platform: windows
23+
python-version: '3.10'
24+
- os: macos-13
25+
platform: macos
26+
python-version: '3.10'
27+
- os: ubuntu-22.04
28+
platform: linux
29+
python-version: '3.10'
30+
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@v4
34+
35+
- name: Set up Python
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
40+
- name: Install system dependencies (Linux)
41+
if: matrix.platform == 'linux'
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y \
45+
libgl1-mesa-glx \
46+
libegl1-mesa \
47+
libxrandr2 \
48+
libxss1 \
49+
libxcursor1 \
50+
libxcomposite1 \
51+
libasound2 \
52+
libxi6 \
53+
libxtst6 \
54+
libglib2.0-0 \
55+
libgtk-3-0
56+
57+
- name: Install Python dependencies
58+
run: |
59+
python -m pip install --upgrade pip
60+
pip install -r requirements.txt
61+
pip install pyinstaller
62+
63+
- name: Build application (Windows)
64+
if: matrix.platform == 'windows'
65+
run: |
66+
pyinstaller --onefile --windowed --name "AugmentCode-Free-v${{ github.event.inputs.version || github.ref_name }}-windows" --add-data "languages;languages" --add-data "config;config" --hidden-import=PyQt6.QtCore --hidden-import=PyQt6.QtGui --hidden-import=PyQt6.QtWidgets --hidden-import=psutil --collect-all=PyQt6 main.py
67+
shell: cmd
68+
69+
- name: Build application (macOS)
70+
if: matrix.platform == 'macos'
71+
run: |
72+
pyinstaller --onefile --windowed \
73+
--name "AugmentCode-Free-v${{ github.event.inputs.version || github.ref_name }}-macos" \
74+
--add-data "languages:languages" \
75+
--add-data "config:config" \
76+
--hidden-import=PyQt6.QtCore \
77+
--hidden-import=PyQt6.QtGui \
78+
--hidden-import=PyQt6.QtWidgets \
79+
--hidden-import=psutil \
80+
--collect-all=PyQt6 \
81+
main.py
82+
83+
- name: Build application (Linux)
84+
if: matrix.platform == 'linux'
85+
run: |
86+
pyinstaller --onefile \
87+
--name "AugmentCode-Free-v${{ github.event.inputs.version || github.ref_name }}-linux" \
88+
--add-data "languages:languages" \
89+
--add-data "config:config" \
90+
--hidden-import=PyQt6.QtCore \
91+
--hidden-import=PyQt6.QtGui \
92+
--hidden-import=PyQt6.QtWidgets \
93+
--hidden-import=psutil \
94+
--collect-all=PyQt6 \
95+
main.py
96+
97+
- name: List dist contents (Windows)
98+
if: matrix.platform == 'windows'
99+
run: |
100+
echo "Contents of dist directory:"
101+
dir dist
102+
shell: cmd
103+
104+
- name: List dist contents (Unix)
105+
if: matrix.platform != 'windows'
106+
run: |
107+
echo "Contents of dist directory:"
108+
ls -la dist/
109+
110+
- name: Upload artifacts
111+
uses: actions/upload-artifact@v4
112+
with:
113+
name: ${{ matrix.platform }}-build
114+
path: dist/*
115+
retention-days: 30
116+
1117
release:
2118
needs: build
3119
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)