FreeDATA/.github/workflows/build-project.yml
2021-08-28 13:03:53 +02:00

121 lines
2.9 KiB
YAML

name: Build/PROJECT
on:
push:
#tags:
# - '*'
jobs:
build_release:
name: Build release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
include:
- os: ubuntu-latest
zip_name: ubuntu_tnc
generator: Unix Makefiles
#- os: macos-latest
# zip_name: plugin-mac
# generator: Xcode
#- os: windows-latest
# zip_name: plugin-win
# generator: Visual Studio 16 2019
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt install portaudio19-dev
python -m pip install --upgrade pip
pip3 install pyaudio
pip3 install psutil
pip3 install crcengine
pip3 install pyinstaller
- name: Build Linux
if: matrix.os == 'ubuntu-latest'
working-directory: tnc
run: |
pyinstaller -F daemon.py -n daemon
pyinstaller -F main.py -n tnc
- name: Compress Linux
shell: bash
run: |
cd ./tnc/dist
mkdir compressed
zip -r ./compressed/${{ matrix.zip_name }}.zip *
- name: Upload Ubuntu TNC artifacts
uses: actions/upload-artifact@v2
with:
name: tnc-artifact
path: ./tnc/dist/compressed/*
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 14
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
package_root: "./gui/"
- name: LIST ALL FILES
shell: bash
run: |
ls -R
- name: Upload Ubuntu GUI artifacts
uses: actions/upload-artifact@v2
with:
name: gui-artifact
path: ./gui/*
release:
name: Upload Release
needs: build_release
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v2
- name: LIST ALL FILES
shell: bash
run: |
ls -R
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
#upload_url: ${{ needs.create_release.outputs.upload_url }}
#asset_path: ./tnc/compressed/${{ matrix.zip_name }}.zip
#asset_name: ${{ matrix.zip_name }}.zip
#asset_content_type: application/zip
files: |
./tnc/compressed/${{ matrix.zip_name }}.zip
LICENSE