2021-08-28 07:44:35 +00:00
|
|
|
name: Build/PROJECT
|
2021-08-28 08:51:29 +00:00
|
|
|
on:
|
|
|
|
push:
|
2021-08-28 10:20:12 +00:00
|
|
|
#tags:
|
|
|
|
# - '*'
|
2021-08-28 07:44:35 +00:00
|
|
|
jobs:
|
2021-08-28 10:31:18 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
create_release:
|
2021-08-28 07:44:35 +00:00
|
|
|
name: Create release
|
|
|
|
outputs:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
steps:
|
|
|
|
- name: Create release
|
|
|
|
id: create_release
|
2021-08-28 10:12:58 +00:00
|
|
|
uses: softprops/action-gh-release@v1
|
2021-08-28 07:44:35 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2021-08-28 08:51:29 +00:00
|
|
|
tag_name: ${{ github.ref }}
|
|
|
|
release_name: ${{ github.ref }}
|
2021-08-28 07:44:35 +00:00
|
|
|
draft: false
|
2021-08-28 08:51:29 +00:00
|
|
|
prerelease: false
|
2021-08-28 07:44:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2021-08-28 10:12:58 +00:00
|
|
|
|
2021-08-28 07:44:35 +00:00
|
|
|
build_release:
|
|
|
|
name: Build release
|
|
|
|
needs: create_release
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-08-28 07:50:06 +00:00
|
|
|
os: [ubuntu-latest]
|
2021-08-28 07:44:35 +00:00
|
|
|
include:
|
|
|
|
- os: ubuntu-latest
|
2021-08-28 08:14:59 +00:00
|
|
|
zip_name: ubuntu_tnc_$(date +'%Y-%m-%dT%H:%M:%S')
|
2021-08-28 07:44:35 +00:00
|
|
|
generator: Unix Makefiles
|
2021-08-28 07:50:06 +00:00
|
|
|
#- os: macos-latest
|
|
|
|
# zip_name: plugin-mac
|
|
|
|
# generator: Xcode
|
|
|
|
#- os: windows-latest
|
|
|
|
# zip_name: plugin-win
|
|
|
|
# generator: Visual Studio 16 2019
|
2021-08-28 07:44:35 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
2021-08-28 08:57:00 +00:00
|
|
|
|
|
|
|
- name: Set up Python 3.8
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
2021-08-28 10:12:58 +00:00
|
|
|
python-version: 3.8
|
2021-08-28 08:57:00 +00:00
|
|
|
|
2021-08-28 07:44:35 +00:00
|
|
|
- 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
|
2021-08-28 10:12:58 +00:00
|
|
|
|
2021-08-28 10:31:18 +00:00
|
|
|
- name: Build and compress Linux
|
2021-08-28 07:44:35 +00:00
|
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
working-directory: tnc
|
|
|
|
run: |
|
|
|
|
pyinstaller -F daemon.py -n daemon
|
|
|
|
pyinstaller -F main.py -n tnc
|
2021-08-28 10:31:18 +00:00
|
|
|
|
|
|
|
|
2021-08-28 07:44:35 +00:00
|
|
|
- name: Compress Linux
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cd ./tnc/dist
|
2021-08-28 10:12:58 +00:00
|
|
|
mkdir ../compressed
|
|
|
|
zip -r ../compressed/${{ matrix.zip_name }}.zip *
|
2021-08-28 07:44:35 +00:00
|
|
|
|
2021-08-28 10:12:58 +00:00
|
|
|
- name: Release Linux
|
|
|
|
uses: softprops/action-gh-release@v1
|
2021-08-28 08:03:40 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-08-28 07:44:35 +00:00
|
|
|
with:
|
2021-08-28 10:12:58 +00:00
|
|
|
#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
|