-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (64 loc) · 1.99 KB
/
Copy pathbuild-executables.yml
File metadata and controls
75 lines (64 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build executables
on:
workflow_dispatch:
push:
tags:
- "v*"
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
artifact_name: FSS-Navigator-macOS
executable_name: FSS-Navigator
- os: windows-latest
artifact_name: FSS-Navigator-Windows
executable_name: FSS-Navigator.exe
- os: ubuntu-latest
artifact_name: FSS-Navigator-Linux
executable_name: FSS-Navigator
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: fssnav
environment-file: environment.yml
auto-activate-base: false
- name: Install PyInstaller
shell: bash -l {0}
run: |
conda activate fssnav
pip install pyinstaller
- name: Build executable
shell: bash -l {0}
run: |
conda activate fssnav
pyinstaller --name FSS-Navigator --onedir run_app.py
- name: Copy project files into bundle
shell: bash -l {0}
run: |
cp -R Computations dist/FSS-Navigator/
cp requirements.txt dist/FSS-Navigator/
cp README.md dist/FSS-Navigator/
- name: Zip bundle on macOS/Linux
if: runner.os != 'Windows'
shell: bash -l {0}
run: |
cd dist
zip -r ${{ matrix.artifact_name }}.zip FSS-Navigator
- name: Zip bundle on Windows
if: runner.os == 'Windows'
shell: pwsh
run: |
Compress-Archive -Path dist/FSS-Navigator -DestinationPath dist/${{ matrix.artifact_name }}.zip
- name: Upload executable artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: dist/${{ matrix.artifact_name }}.zip