mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Update build-tnc.yml
This commit is contained in:
parent
6d55f2c080
commit
d7a55d2501
1 changed files with 44 additions and 62 deletions
86
.github/workflows/build-tnc.yml
vendored
86
.github/workflows/build-tnc.yml
vendored
|
@ -1,67 +1,49 @@
|
||||||
name: Build
|
|
||||||
|
|
||||||
on:
|
name: Build/TNC
|
||||||
push:
|
on: push
|
||||||
# tags:
|
|
||||||
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
ubuntu-latest:
|
||||||
createrelease:
|
runs-on: ubuntu-latest
|
||||||
name: Create Release
|
|
||||||
runs-on: [ubuntu-latest]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Create Release
|
- name: Check out Git repository
|
||||||
id: create_release
|
uses: actions/checkout@v2
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.ref }}
|
|
||||||
release_name: Release ${{ github.ref }}
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
- name: Output Release URL File
|
|
||||||
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
|
|
||||||
- name: Save Release URL File for publish
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: release_url
|
|
||||||
path: release_url.txt
|
|
||||||
|
|
||||||
build:
|
|
||||||
name: Build packages
|
|
||||||
needs: createrelease
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: macos-latest
|
|
||||||
TARGET: macos
|
|
||||||
CMD_BUILD: >
|
|
||||||
pyinstaller -F -w -n daemon daemon.py &&
|
|
||||||
cd dist/ &&
|
|
||||||
zip -r9 daemon daemon.app/
|
|
||||||
OUT_FILE_NAME: daemon.zip
|
|
||||||
ASSET_MIME: application/zip
|
|
||||||
- os: windows-latest
|
|
||||||
TARGET: windows
|
|
||||||
CMD_BUILD: pyinstaller -F -w -n daemon daemon.py
|
|
||||||
OUT_FILE_NAME: daemon.exe
|
|
||||||
ASSET_MIME: application/vnd.microsoft.portable-executable
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- name: Set up Python 3.8
|
- name: Set up Python 3.8
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: 3.8
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
sudo apt install portaudio19-dev
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip3 install pyaudio
|
pip3 install pyaudio
|
||||||
pip3 install psutil
|
pip3 install psutil
|
||||||
pip3 install crcengine
|
pip3 install crcengine
|
||||||
pip3 install threading
|
pip3 install pyinstaller
|
||||||
- name: Build with pyinstaller for ${{matrix.TARGET}}
|
- name: Build with Pyinstaller
|
||||||
run: ${{matrix.CMD_BUILD}}
|
working-directory: tnc
|
||||||
|
run: |
|
||||||
|
pyinstaller -F daemon.py -n daemon
|
||||||
|
pyinstaller -F main.py -n tnc
|
||||||
|
cd dist
|
||||||
|
ls -R
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
prerelease: false
|
||||||
|
files: |
|
||||||
|
dist/daemon
|
||||||
|
dist/tnc
|
||||||
|
LICENSE
|
||||||
|
|
||||||
|
|
||||||
|
#- name: Save build artifacts to Action
|
||||||
|
# uses: actions/upload-artifact@v2
|
||||||
|
# with:
|
||||||
|
# name: ubuntu-latest
|
||||||
|
# path: ./tnc/dist/
|
||||||
|
# if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
|
||||||
|
|
Loading…
Reference in a new issue