FreeDATA/.github/workflows/build-project.yml

94 lines
2.5 KiB
YAML
Raw Normal View History

2021-08-28 07:44:35 +00:00
name: Build/PROJECT
on: push
jobs:
create_release:
name: Create release
runs-on: ubuntu-latest
# Note this. We are going to use that in further jobs.
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# tag_name: ${{ github.ref }}
2021-08-28 07:58:19 +00:00
tag_name: v0.1-alpha
2021-08-28 07:44:35 +00:00
# release_name: Release ${{ github.ref }}
2021-08-28 07:58:19 +00:00
release_name: v0.1-alpha
2021-08-28 07:44:35 +00:00
draft: false
prerelease: true
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
zip_name: plugin-linux
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
- 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 with Pyinstaller Linux
if: matrix.os == 'ubuntu-latest'
working-directory: tnc
run: |
pyinstaller -F daemon.py -n daemon
pyinstaller -F main.py -n tnc
# cd dist
# ls -R
- name: Compress Linux
shell: bash
run: |
cd ./tnc/dist
mkdir ../artifact
zip -r ../artifact/${{ matrix.zip_name }}.zip *
2021-08-28 07:56:50 +00:00
- name: Release Linux
uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
2021-08-28 07:44:35 +00:00
with:
2021-08-28 07:56:50 +00:00
name: Test-Release-Ubuntu
tag_name: v0.1-alpha
prerelease: true
2021-08-28 07:44:35 +00:00
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./tnc/dist/artifact/${{ matrix.zip_name }}.zip
asset_name: ${{ matrix.zip_name }}.zip
asset_content_type: application/zip
2021-08-28 08:00:45 +00:00
files: |
./tnc/dist/artifact/${{ matrix.zip_name }}.zip
2021-08-28 07:56:50 +00:00
# ./tnc/dist/tnc
# LICENSE