Try onefile #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
name: Build | |
strategy: | |
matrix: | |
os: [ macos-13, windows-latest ] | |
include: | |
- os: macos-13 | |
spec: build_macos.spec | |
package_name: macos-binary | |
- os: windows-latest | |
spec: build_windows.spec | |
package_name: windows-binary | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
- name: Install deps | |
run: | | |
python -m pip install setuptools wheel pyinstaller | |
python -m pip install -r requirements.txt | |
python -m pip list | |
- name: Create Executable | |
run: pyinstaller ${{ matrix.spec }} | |
- name: Artifact upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.package_name }} | |
path: dist/QuantiFish.* | |
retention-days: 30 | |
publish-pypi: | |
name: Pypi | |
if: startsWith(github.ref, 'refs/tags') | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create release draft | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
windows-binary/*.exe | |
macos-binary/*.zip | |
draft: true | |
fail_on_unmatched_files: true |