Skip to content

Add pyinstaller + tauri app #14

Add pyinstaller + tauri app

Add pyinstaller + tauri app #14

name: Build App with Pyinstaller
on:
pull_request:
# inputs:
# platform:
# description: 'platform'
# required: true
# default: 'macos-latest'
# type: choice
# options:
# - 'windows-latest'
# - 'macos-latest'
# - 'ubuntu-latest'
jobs:
build:
env:
platform: ubuntu-latest
name: ubuntu-latest # ${{ env.platform }}
runs-on: ubuntu-latest # ${{ env.platform }}
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Conda (windows)
if: env.platform == 'windows-latest'
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: ''
- name: Install Monopoly dependencies (windows)
if: env.platform == 'windows-latest'
run: |
conda install -c conda-forge poppler
pip install -r requirements.txt
- name: Install Monopoly dependencies (ubuntu/mac)
if: env.platform == 'macos-latest' || env.platform == 'ubuntu-latest'
uses: daaku/gh-action-apt-install@v4
with:
packages: build-essential libpoppler-cpp-dev pkg-config
- name: Install Rust for ubuntu-latest
if: env.platform == 'ubuntu-latest'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: x86_64-unknown-linux-musl
- name: Install Rust for windows-latest
if: env.platform == 'windows-latest'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable-x86_64-msvc
target: x86_64-pc-windows-msvc
- name: Install Rust for macos-latest
if: env.platform == 'macos-latest'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: x86_64-apple-darwin
- name: Get host type
run: |
host=$(rustc -Vv | grep host)
echo "HOST=$(echo $host | cut -f2 -d' ')" >> $GITHUB_ENV
- name: Create executable
uses: sayyid5416/pyinstaller@v1
with:
python_ver: '3.11'
pyinstaller_ver: '==6.8.0'
spec: entrypoint.spec
requirements: requirements.txt
options: --onefile, --name "monopoly"
upload_exe_with_name: 'monopoly-${{ env.HOST }}'