build #40
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: | |
schedule: | |
- cron: '0 0 * * 1' | |
workflow_dispatch: | |
inputs: | |
type: | |
description: 'Whether to build a single file (onefile) or directory (dir) dist' | |
required: true | |
default: 'dir' | |
jobs: | |
build-windows: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniconda-version: "latest" | |
channels: conda-forge,defaults | |
auto-update-conda: true | |
python-version: 3.9 | |
activate-environment: test | |
- name: Install CadQuery and pyinstaller | |
shell: powershell | |
run: | | |
conda install python=3.9 | |
conda install -c cadquery -c conda-forge cadquery=master | |
pip install --upgrade pyinstaller==5.13.0 | |
pip install path | |
- name: Run build | |
shell: powershell | |
run: | | |
conda info | |
pyinstaller pyinstaller.spec ${{ github.event.inputs.type }} | |
$opensslPath = Get-Command openssl | Select-Object -ExpandProperty Source | |
$opensslDir = Split-Path -Parent $opensslPath | |
Copy-Item "$opensslDir\libssl-1_1-x64.dll" "D:\a\CQ-editor\CQ-editor\dist\CQ-editor\" -ErrorAction SilentlyContinue | |
Copy-Item "$opensslDir\libcrypto-1_1-x64.dll" "D:\a\CQ-editor\CQ-editor\dist\CQ-editor\" -ErrorAction SilentlyContinue | |
Copy-Item D:\a\CQ-editor\CQ-editor\pyinstaller\CQ-editor.cmd D:\a\CQ-editor\CQ-editor\dist\ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: CQ-editor-Windows | |
path: dist |