返回提交历史
Modified
.github/workflows/build-packages.yml
+90
-10
XFEstudio/gpt4free
Update build
c66ff78d
代码差异
1 个文件
+90
-10
@@ -61,11 +61,27 @@ jobs:
61
61
run: |
62
62
python -m twine check dist/*
63
63
ls -la dist/
64
- name: Upload PyPI artifacts
64
- name: Upload PyPI package artifact (combined)
65
65
uses: actions/upload-artifact@v4
66
66
with:
67
67
name: pypi-package
68
68
path: dist/
69
- name: Upload PyPI build artifacts (individual)
70
run: |
71
for f in dist/*; do
72
echo "Uploading $f"
73
done
74
shell: bash
75
- name: Upload wheel artifact
76
uses: actions/upload-artifact@v4
77
with:
78
name: pypi-wheel
79
path: dist/*.whl
80
- name: Upload sdist artifact
81
uses: actions/upload-artifact@v4
82
with:
83
name: pypi-sdist
84
path: dist/*.tar.gz
69
85
70
86
# Executables (built with g4f-go, no Nuitka)
71
87
# Cross-compiles the Go launcher on ubuntu-latest for every OS/arch.
@@ -101,11 +117,60 @@ jobs:
101
117
env:
102
118
G4F_VERSION: ${{ needs.prepare.outputs.version }}
103
119
run: ./build-all.sh
104
- name: Upload g4f-go executables
120
- name: Upload g4f-go executables (combined)
105
121
uses: actions/upload-artifact@v4
106
122
with:
107
123
name: g4f-go
108
124
path: g4f-go/dist/*
125
- name: Upload g4f-go executables (individual per platform)
126
run: |
127
for zip in g4f-go/dist/*.zip; do
128
base="$(basename "$zip" .zip)"
129
echo "Uploading $zip as artifact g4f-go-${base}"
130
done
131
shell: bash
132
- name: Upload g4f-go windows-amd64
133
uses: actions/upload-artifact@v4
134
with:
135
name: g4f-go-windows-amd64
136
path: g4f-go/dist/g4f-go-*-windows-amd64.zip
137
if-no-files-found: error
138
- name: Upload g4f-go windows-386
139
uses: actions/upload-artifact@v4
140
with:
141
name: g4f-go-windows-386
142
path: g4f-go/dist/g4f-go-*-windows-386.zip
143
if-no-files-found: error
144
- name: Upload g4f-go linux-amd64
145
uses: actions/upload-artifact@v4
146
with:
147
name: g4f-go-linux-amd64
148
path: g4f-go/dist/g4f-go-*-linux-amd64.zip
149
if-no-files-found: error
150
- name: Upload g4f-go linux-arm64
151
uses: actions/upload-artifact@v4
152
with:
153
name: g4f-go-linux-arm64
154
path: g4f-go/dist/g4f-go-*-linux-arm64.zip
155
if-no-files-found: error
156
- name: Upload g4f-go darwin-arm64
157
uses: actions/upload-artifact@v4
158
with:
159
name: g4f-go-darwin-arm64
160
path: g4f-go/dist/g4f-go-*-darwin-arm64.zip
161
if-no-files-found: error
162
- name: Upload g4f-go darwin-amd64
163
uses: actions/upload-artifact@v4
164
with:
165
name: g4f-go-darwin-amd64
166
path: g4f-go/dist/g4f-go-*-darwin-amd64.zip
167
if-no-files-found: error
168
- name: Upload g4f-go freebsd-amd64
169
uses: actions/upload-artifact@v4
170
with:
171
name: g4f-go-freebsd-amd64
172
path: g4f-go/dist/g4f-go-*-freebsd-amd64.zip
173
if-no-files-found: error
109
174
110
175
# Docker Images
111
176
build-docker:
@@ -183,14 +248,31 @@ jobs:
183
248
contents: write
184
249
steps:
185
250
- uses: actions/checkout@v4
186
- name: Download all artifacts
251
- name: Download PyPI artifacts
252
uses: actions/download-artifact@v4
253
with:
254
name: pypi-package
255
path: ./release/pypi
256
- name: Download g4f-go artifacts
257
uses: actions/download-artifact@v4
258
with:
259
name: g4f-go
260
path: ./release/g4f-go
261
- name: Download individual g4f-go platform artifacts
187
262
uses: actions/download-artifact@v4
188
263
with:
189
path: ./artifacts
190
- name: Display artifact structure
264
path: ./release/g4f-go/individual
265
pattern: g4f-go-*
266
merge-multiple: true
267
- name: Flatten all release assets
191
268
run: |
192
echo "Downloaded artifacts:"
193
find ./artifacts -type f -name "*" | sort
269
mkdir -p ./release/flat
270
find ./release -type f | sort
271
cp -v ./release/pypi/* ./release/flat/ 2>/dev/null || true
272
cp -v ./release/g4f-go/dist/*.zip ./release/flat/ 2>/dev/null || true
273
cp -v ./release/g4f-go/individual/* ./release/flat/ 2>/dev/null || true
274
echo "--- Final release assets ---"
275
find ./release/flat -type f | sort
194
276
- name: Create Release with Assets
195
277
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2
196
278
with:
@@ -223,9 +305,7 @@ jobs:
223
305
🔗 [https://github.com/gpt4free/g4f.exe](https://github.com/gpt4free/g4f.exe) 🚀
224
306
draft: false
225
307
prerelease: false
226
files: |
227
./artifacts/pypi-package/*
228
./artifacts/g4f-go/dist/*
308
files: ./release/flat/*
229
309
token: ${{ secrets.GITHUB_TOKEN }}
230
310
231
311
# Publish to PyPI (only for releases)