返回提交历史
Modified
.github/workflows/build-packages.yml
+9
-6
XFEstudio/gpt4free
Fix build
a066b3a0
代码差异
1 个文件
+9
-6
@@ -81,11 +81,10 @@ jobs:
81
81
pip install -r requirements.txt
82
82
pip install pyinstaller
83
83
pip install -e .
84
- name: Build Windows executable
85
env:
86
G4F_VERSION: ${{ needs.prepare.outputs.version }}
84
- name: Write g4f_cli.py
85
shell: pwsh
87
86
run: |
88
cat > g4f_cli.py << EOF
87
@"
89
88
#!/usr/bin/env python3
90
89
"""
91
90
Entry point for g4f CLI executable builds
@@ -98,7 +97,11 @@ jobs:
98
97
if __name__ == "__main__":
99
98
from g4f.cli import main
100
99
main()
101
EOF
100
"@ | Set-Content -Path g4f_cli.py -Encoding utf8
101
- name: Build Windows executable
102
env:
103
G4F_VERSION: ${{ needs.prepare.outputs.version }}
104
run: |
102
105
pyinstaller --onefile --name g4f-windows-${{ needs.prepare.outputs.version }} --icon projects/windows/icon.ico g4f_cli.py
103
106
- name: Upload Windows executable
104
107
uses: actions/upload-artifact@v4
@@ -210,7 +213,7 @@ jobs:
210
213
- name: Install build tools
211
214
run: |
212
215
python -m pip install --upgrade pip
213
python -m pip install build
216
python -m pip install build --user
214
217
- name: Create Debian package structure
215
218
run: |
216
219
mkdir -p debian/g4f/usr/bin