Skip to content

Commit b3eecc1

Browse files
authored
ci: rename workflow and add src files to artifact
1 parent 82cd5eb commit b3eecc1

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

.github/workflows/build.yml

+22-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build PyInstaller App
1+
name: Build AutoGGUF (PyInstaller)
22

33
on:
44
workflow_dispatch:
@@ -31,7 +31,7 @@ jobs:
3131
run: |
3232
python -m pip install --upgrade pip
3333
pip install $(grep -v "^torch" requirements.txt)
34-
pip install pyinstaller
34+
pip install pyinstaller pillow
3535
3636
- name: Build with PyInstaller (Windows)
3737
if: matrix.os == 'windows-latest'
@@ -51,8 +51,27 @@ jobs:
5151
pyinstaller --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets:assets" --distpath=build/dev/dist --workpath=build/dev/build --specpath=build/dev src/main.py
5252
fi
5353
54+
- name: Copy additional files (Windows)
55+
if: matrix.os == 'windows-latest'
56+
run: |
57+
$distPath = if ("${{ github.event.inputs.build_type }}" -eq "RELEASE") { "build\release\dist" } else { "build\dev\dist" }
58+
New-Item -ItemType Directory -Force -Path "$distPath\src\gguf-py"
59+
Copy-Item -Path "src\gguf-py\*" -Destination "$distPath\src\gguf-py" -Recurse
60+
Copy-Item -Path "src\convert_lora_to_gguf.py" -Destination "$distPath\src"
61+
Copy-Item -Path "src\convert_lora_to_ggml.py" -Destination "$distPath\src"
62+
63+
- name: Copy additional files (Linux/macOS)
64+
if: matrix.os != 'windows-latest'
65+
run: |
66+
distPath=$(if [ "${{ github.event.inputs.build_type }}" = "RELEASE" ]; then echo "build/release/dist"; else echo "build/dev/dist"; fi)
67+
mkdir -p $distPath/src/gguf-py
68+
cp -R src/gguf-py/* $distPath/src/gguf-py/
69+
cp src/convert_lora_to_gguf.py $distPath/src/
70+
cp src/convert_lora_to_ggml.py $distPath/src/
71+
5472
- name: Upload Artifact
5573
uses: actions/upload-artifact@v2
5674
with:
5775
name: AutoGGUF-${{ matrix.os }}-${{ github.event.inputs.build_type }}-${{ github.sha }}
58-
path: build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist/AutoGGUF*
76+
path: build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist
77+

0 commit comments

Comments
 (0)