FreeDATA/.github/workflows/build-project-win.yml
dj2ls 31c1bcac36 optimzed build action
tnc single builds are now provided AFTER electron builder
2022-02-23 08:51:06 +01:00

114 lines
3.1 KiB
YAML

name: Windows Nightly
on:
push:
#tags:
#- '*'
jobs:
build_windows_release:
name: Build Windows release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
include:
- os: windows-latest
zip_name: windows_tnc
generator: Visual Studio 16 2019
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ls-leave-prototype
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Python dependencies
if: matrix.os == 'windows-latest'
run: |
python -m pip install --upgrade pip
pip install psutil
pip install crcengine
pip install pyinstaller
pip install ujson
pip install pyserial
pip install numpy
pip install structlog
pip install colorama
# curl.exe --output PyAudio-0.2.11-cp39-cp39-win_amd64.whl --url https://download.lfd.uci.edu/pythonlibs/y2rycu7g/PyAudio-0.2.11-cp39-cp39-win_amd64.whl
# pip install PyAudio-0.2.11-cp39-cp39-win_amd64.whl
- name: Install Pyaudio
if: matrix.os == 'windows-latest'
working-directory: tnc/lib/pyaudio/windows
run: |
pip install PyAudio-0.2.11-cp39-cp39-win_amd64.whl
- name: Build Windows Daemon and TNC
if: matrix.os == 'windows-latest'
working-directory: tnc
run: |
pyinstaller freedata.spec
- name: Copy TNC to GUI
shell: bash
run: |
cp -R ./tnc/dist/tnc ./gui/tnc
- name: LIST ALL FILES
shell: bash
run: |
ls -R
- name: Archive TNC
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: '${{ matrix.zip_name }}.zip'
directory: ./tnc/dist/tnc
path: .
#exclusions: '*.git* /*node_modules/* .editorconfig'
- name: LIST ALL FILES
shell: bash
working-directory: tnc
run: |
ls -R
#- name: Build codec2
# shell: bash
# run: |
# choco install ninja cmake
# ninja --version
# cmake --version
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 16
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
package_root: "./gui/"
github_token: ${{ secrets.github_token }}
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
- name: Release TNC
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
draft: true
files: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip