mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
split github action
This commit is contained in:
parent
eefb70f343
commit
5d26c3c198
|
@ -1,125 +1,10 @@
|
|||
name: Build/PROJECT
|
||||
name: Build/PROJECT/LINUX
|
||||
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: LIST ALL FILES
|
||||
shell: bash
|
||||
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: 14
|
||||
|
||||
|
||||
- name: Build/release Electron app
|
||||
uses: samuelmeuli/action-electron-builder@v1
|
||||
with:
|
||||
package_root: "./gui/"
|
||||
github_token: ${{ secrets.github_token }}
|
||||
|
||||
- name: LIST ALL FILES
|
||||
shell: bash
|
||||
run: |
|
||||
ls -R
|
||||
|
||||
|
||||
- name: Create app bundle
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir gui-bundle
|
||||
cp -R ./gui/dist/win-unpacked/ gui-bundle
|
||||
cp -R ./tnc/dist/tnc gui-bundle/win-unpacked
|
||||
|
||||
- name: LIST ALL FILES
|
||||
shell: bash
|
||||
run: |
|
||||
ls -R
|
||||
|
||||
|
||||
- name: Archive Release
|
||||
uses: thedoctor0/zip-release@master
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'FreeDATA_windows.zip'
|
||||
directory: ./gui-bundle/
|
||||
path: .
|
||||
#exclusions: '*.git* /*node_modules/* .editorconfig'
|
||||
|
||||
- name: Upload Windows GUI Bundle artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: gui-bundle-windows-artifact
|
||||
path: ./gui-bundle/FreeDATA_windows.zip
|
||||
|
||||
- name: LIST ALL FILES
|
||||
shell: bash
|
||||
run: |
|
||||
ls -R
|
||||
|
||||
build_linux_release:
|
||||
name: Build Linux release
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
@ -250,50 +135,23 @@ jobs:
|
|||
cd ./gui-bundle
|
||||
zip -r FreeDATA_linux.zip .
|
||||
ls -R
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Upload Ubuntu GUI Bundle artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: gui-bundle-ubuntu-artifact
|
||||
path: ./gui-bundle/FreeDATA_linux.zip
|
||||
|
||||
|
||||
|
||||
|
||||
release:
|
||||
name: Upload Release
|
||||
needs: [build_linux_release, build_windows_release]
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
|
||||
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v2
|
||||
|
||||
|
||||
- name: LIST ALL FILES
|
||||
shell: bash
|
||||
run: |
|
||||
ls -R
|
||||
|
||||
|
||||
- name: Release
|
||||
uses: WebFreak001/deploy-nightly@v1.1.0
|
||||
#uses: softprops/action-gh-release@v1
|
||||
#if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/DJ2LS/FreeDATA/releases/48616289/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part
|
||||
release_id: 48616289 # same as above (id can just be taken out the upload_url, it's used to find old releases)
|
||||
asset_path: ./gui-bundle-ubuntu-artifact/FreeDATA_linux.zip # path to archive to upload
|
||||
asset_path: ./gui-bundle/FreeDATA_linux.zip # path to archive to upload
|
||||
asset_name: FreeDATA_linux-nightly-$$.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
|
||||
asset_content_type: application/zip # required by GitHub API
|
||||
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
|
||||
#files: |
|
||||
# ./gui-bundle-ubuntu-artifact/codec2-FreeDATA_ubuntu.zip
|
||||
# ./tnc-artifact/ubuntu_tnc.zip
|
||||
# LICENSE
|
||||
|
||||
|
134
.github/workflows/build-project-win.yml
vendored
Normal file
134
.github/workflows/build-project-win.yml
vendored
Normal file
|
@ -0,0 +1,134 @@
|
|||
name: Build/PROJECT/WIN
|
||||
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: LIST ALL FILES
|
||||
shell: bash
|
||||
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: 14
|
||||
|
||||
|
||||
- name: Build/release Electron app
|
||||
uses: samuelmeuli/action-electron-builder@v1
|
||||
with:
|
||||
package_root: "./gui/"
|
||||
github_token: ${{ secrets.github_token }}
|
||||
|
||||
- name: LIST ALL FILES
|
||||
shell: bash
|
||||
run: |
|
||||
ls -R
|
||||
|
||||
|
||||
- name: Create app bundle
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir gui-bundle
|
||||
cp -R ./gui/dist/win-unpacked/ gui-bundle
|
||||
cp -R ./tnc/dist/tnc gui-bundle/win-unpacked
|
||||
|
||||
- name: LIST ALL FILES
|
||||
shell: bash
|
||||
run: |
|
||||
ls -R
|
||||
|
||||
|
||||
- name: Archive Release
|
||||
uses: thedoctor0/zip-release@master
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'FreeDATA_windows.zip'
|
||||
directory: ./gui-bundle/
|
||||
path: .
|
||||
#exclusions: '*.git* /*node_modules/* .editorconfig'
|
||||
|
||||
- name: Upload Windows GUI Bundle artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: gui-bundle-windows-artifact
|
||||
path: ./gui-bundle/FreeDATA_windows.zip
|
||||
|
||||
- name: LIST ALL FILES
|
||||
shell: bash
|
||||
run: |
|
||||
ls -R
|
||||
|
||||
- name: Release
|
||||
uses: WebFreak001/deploy-nightly@v1.1.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/DJ2LS/FreeDATA/releases/48616289/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part
|
||||
release_id: 48616289 # same as above (id can just be taken out the upload_url, it's used to find old releases)
|
||||
asset_path: ./gui-bundle/FreeDATA_windows.zip # path to archive to upload
|
||||
asset_name: FreeDATA_windows-nightly-$$.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
|
||||
asset_content_type: application/zip # required by GitHub API
|
||||
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
|
||||
|
Loading…
Reference in a new issue