mirror of
https://github.com/soxoj/maigret.git
synced 2026-05-07 06:24:35 +00:00
Pyinstaller GitHub workflow fix (#2298)
This commit is contained in:
@@ -2,54 +2,69 @@ name: Package exe with PyInstaller - Windows
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, dev ]
|
branches: [main, dev]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: PyInstaller Windows Build
|
# Wine Python (not Linux) runs PyInstaller; altgraph needs pkg_resources — reinstall setuptools after all deps.
|
||||||
uses: JackMcKew/pyinstaller-action-windows@main
|
- name: Prepare requirements for Wine (setuptools last)
|
||||||
with:
|
run: |
|
||||||
path: pyinstaller
|
set -euo pipefail
|
||||||
|
cp pyinstaller/requirements.txt pyinstaller/requirements-wine.txt
|
||||||
|
{
|
||||||
|
echo ""
|
||||||
|
echo "# CI: setuptools last so pkg_resources exists for PyInstaller/altgraph in Wine"
|
||||||
|
echo "setuptools==70.0.0"
|
||||||
|
} >> pyinstaller/requirements-wine.txt
|
||||||
|
|
||||||
- name: Upload PyInstaller Binary to Workflow as Artifact
|
- name: PyInstaller Windows Build
|
||||||
uses: actions/upload-artifact@v4
|
uses: JackMcKew/pyinstaller-action-windows@main
|
||||||
with:
|
with:
|
||||||
name: maigret_standalone_win32
|
path: pyinstaller
|
||||||
path: pyinstaller/dist/windows
|
requirements: requirements-wine.txt
|
||||||
|
|
||||||
- name: Download PyInstaller Binary
|
- name: Upload PyInstaller Binary to Workflow as Artifact
|
||||||
uses: actions/download-artifact@v4
|
if: success()
|
||||||
with:
|
uses: actions/upload-artifact@v4
|
||||||
name: maigret_standalone_win32
|
with:
|
||||||
|
name: maigret_standalone_win32
|
||||||
|
path: pyinstaller/dist/windows
|
||||||
|
|
||||||
- name: Create New Release and Upload PyInstaller Binary to Release
|
- name: Download PyInstaller Binary
|
||||||
uses: ncipollo/release-action@v1.14.0
|
if: success()
|
||||||
id: create_release
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
allowUpdates: true
|
name: maigret_standalone_win32
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
artifactErrorsFailBuild: true
|
|
||||||
makeLatest: true
|
|
||||||
replacesArtifacts: true
|
|
||||||
artifacts: maigret_standalone.exe
|
|
||||||
name: Development Windows Release [${{ github.ref_name }}]
|
|
||||||
tag: ${{ github.ref_name }}
|
|
||||||
body: |
|
|
||||||
This is a development release built from the **${{ github.ref_name }}** branch.
|
|
||||||
|
|
||||||
Take into account that `dev` releases may be unstable.
|
- name: Create New Release and Upload PyInstaller Binary to Release
|
||||||
Please, use [the development release](https://github.com/soxoj/maigret/releases/tag/main) build from the **main** branch.
|
if: success()
|
||||||
|
uses: ncipollo/release-action@v1.14.0
|
||||||
|
id: create_release
|
||||||
|
with:
|
||||||
|
allowUpdates: true
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
artifactErrorsFailBuild: true
|
||||||
|
makeLatest: true
|
||||||
|
replacesArtifacts: true
|
||||||
|
artifacts: maigret_standalone.exe
|
||||||
|
name: Development Windows Release [${{ github.ref_name }}]
|
||||||
|
tag: ${{ github.ref_name }}
|
||||||
|
body: |
|
||||||
|
This is a development release built from the **${{ github.ref_name }}** branch.
|
||||||
|
|
||||||
Instructions:
|
Take into account that `dev` releases may be unstable.
|
||||||
- Download the attached file `maigret_standalone.exe` to get the Windows executable.
|
Please, use [the development release](https://github.com/soxoj/maigret/releases/tag/main) build from the **main** branch.
|
||||||
- Video guide on how to run it: https://youtu.be/qIgwTZOmMmM
|
|
||||||
- For detailed documentation, visit: https://maigret.readthedocs.io/en/latest/
|
|
||||||
|
|
||||||
env:
|
Instructions:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
- Download the attached file `maigret_standalone.exe` to get the Windows executable.
|
||||||
|
- Video guide on how to run it: https://youtu.be/qIgwTZOmMmM
|
||||||
|
- For detailed documentation, visit: https://maigret.readthedocs.io/en/latest/
|
||||||
|
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|||||||
Reference in New Issue
Block a user