ci(CICD): add pyinstaller build for binary
This commit is contained in:
1 parent
060f429282
commit
07da497eed
1 file changed
+22
-5
@@ -93,17 +93,34 @@ jobs:
|
|||||||
working-directory: wallpaper_changer
|
working-directory: wallpaper_changer
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
python -m pip install build
|
python -m pip install pyinstaller build
|
||||||
python -m pip install ../serverlibrary
|
python -m pip install ../serverlibrary
|
||||||
python -m pip install .
|
python -m pip install .
|
||||||
|
|
||||||
- name: Build Python package
|
- name: Build executable
|
||||||
working-directory: wallpaper_changer
|
working-directory: wallpaper_changer
|
||||||
run: |
|
run: |
|
||||||
python -m build
|
python -m PyInstaller \
|
||||||
|
--clean \
|
||||||
|
--onefile \
|
||||||
|
--paths src \
|
||||||
|
--name wallpaper_changer \
|
||||||
|
main.py
|
||||||
|
|
||||||
|
- name: Build wheel
|
||||||
|
working-directory: wallpaper_changer
|
||||||
|
run: |
|
||||||
|
python -m build --wheel
|
||||||
|
|
||||||
|
- name: Verify build outputs
|
||||||
|
run: |
|
||||||
|
ls -lh wallpaper_changer/dist/
|
||||||
|
test -f wallpaper_changer/dist/wallpaper_changer
|
||||||
|
ls wallpaper_changer/dist/*.whl
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: https://github.com/christopherHX/gitea-upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: wallpaper-changer-dist
|
name: wallpaper-changer-build
|
||||||
path: wallpaper_changer/dist/
|
path: wallpaper_changer/dist/
|
||||||
|
if-no-files-found: error
|
||||||
Reference in new issue
Block a user