Skip to content

implement workaround for when sys.stdout and sys.stderr are None #93

implement workaround for when sys.stdout and sys.stderr are None

implement workaround for when sys.stdout and sys.stderr are None #93

Workflow file for this run

name: Package Application with Pyinstaller
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
build_linux:
needs: release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install requirements
run: sudo apt-get install libgirepository1.0-dev && pip install -r requirements.txt
- name: Run PyInstaller
run: pyinstaller main.spec
- name: Test CLI
run: ./dist/DistanceEstimation --cli --help
- name: Upload artifacts
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./dist/DistanceEstimation
asset_name: DistanceEstimation_linux_x64
asset_content_type: application/x-executable
build_macos_x64:
needs: release
runs-on: macos-13
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install requirements
run: pip install -r requirements_macos.txt
- name: Run PyInstaller
run: pyinstaller main.spec
- name: Test CLI
run: ./dist/DistanceEstimation.app/Contents/MacOS/DistanceEstimation --cli --help
- name: Package as DMG file
run: dmgbuild -s dmgbuild_settings.py DistanceEstimation dist/DistanceEstimation.dmg
- name: Upload artifacts
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./dist/DistanceEstimation.dmg
asset_name: DistanceEstimation_mac_x64.dmg
asset_content_type: application/octet-stream
build_macos_arm64:
needs: release
runs-on: macos-13-large
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install requirements
run: pip install -r requirements_macos.txt
- name: Run PyInstaller
run: pyinstaller main.spec
- name: Test CLI
run: ./dist/DistanceEstimation.app/Contents/MacOS/DistanceEstimation --cli --help
- name: Package as DMG file
run: dmgbuild -s dmgbuild_settings.py DistanceEstimation dist/DistanceEstimation.dmg
- name: Upload artifacts
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./dist/DistanceEstimation.dmg
asset_name: DistanceEstimation_mac_arm64.dmg
asset_content_type: application/octet-stream
build_windows:
needs: release
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install requirements
run: pip install -r requirements.txt
- name: Run PyInstaller
run: pyinstaller main.spec
- name: Test CLI
run: .\dist\DistanceEstimation.exe --cli --help
- name: Upload artifacts
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./dist/DistanceEstimation.exe
asset_name: DistanceEstimation_win_x64.exe
asset_content_type: application/vnd.microsoft.portable-executable